Issue | Fix Version | Assignee | Priority | Status | Resolution | Resolved In Build |
---|---|---|---|---|---|---|
JDK-8285992 | jfx17.0.4 | Ambarish Rapte | P4 | Resolved | Fixed | |
JDK-8283054 | 8u341 | Dukebot | P4 | Resolved | Fixed | b01 |
JDK-8285856 | jfx11.0.16 | Ambarish Rapte | P4 | Resolved | Fixed |
A DESCRIPTION OF THE PROBLEM :
When using copy & paste within the JavaFX WebView, the list in e.clipboardData.types gets longet with every paste.
If a earlier copy-event contains "text/plain" and "text/html" data flavors and a following copy onle "text/plain", the next paste-event still contains the "text/html" flavor with data from the first copy-event.
STEPS TO FOLLOW TO REPRODUCE THE PROBLEM :
1. Select some text of the example page within the JavaFX WebView and press Ctrl+C
2. Press Ctrl+V - the webview displays that the pase-event contains "text/plain" and "text/html" data flavors with your selected text.
3. Select and copy text from an application, which only delivers text/plain, for example notepad.
4. Press Ctrl+V - the webview now displays some duplicate "text/plain" data flavors in the paste-event. The "text/html" still contains data from the first copy-event.
EXPECTED VERSUS ACTUAL BEHAVIOR :
EXPECTED -
After step 4 the example page should only display one "text/plane" data flavor with the content of the last copy-event.
ACTUAL -
After step 4 the example page displays multiple "text/plane" data flavors and an old "text/html" data flavor, which contains old data.
---------- BEGIN SOURCE ----------
Load this html into a JavaFX WebView:
<html>
<head>
<script>
document.addEventListener('paste', e => {
let messages = [];
if (e.clipboardData.types) {
e.clipboardData.types.forEach(type => {
messages.push( type + ": " + e.clipboardData.getData(type));
});
}
document.getElementById("clipboardData").innerHTML = messages.join("<br />");
});
</script>
</head>
<body>
<b>This is a test of the clipboard. The content of the clipboard will be displayed below after pressing ctrl+v:</b>
<div id="clipboardData"></div>
<br/>
<a href="https://evercoder.github.io/clipboard-inspector/">click here to get a better clipboard inspector</a>
</body>
</html>
---------- END SOURCE ----------
FREQUENCY : always
When using copy & paste within the JavaFX WebView, the list in e.clipboardData.types gets longet with every paste.
If a earlier copy-event contains "text/plain" and "text/html" data flavors and a following copy onle "text/plain", the next paste-event still contains the "text/html" flavor with data from the first copy-event.
STEPS TO FOLLOW TO REPRODUCE THE PROBLEM :
1. Select some text of the example page within the JavaFX WebView and press Ctrl+C
2. Press Ctrl+V - the webview displays that the pase-event contains "text/plain" and "text/html" data flavors with your selected text.
3. Select and copy text from an application, which only delivers text/plain, for example notepad.
4. Press Ctrl+V - the webview now displays some duplicate "text/plain" data flavors in the paste-event. The "text/html" still contains data from the first copy-event.
EXPECTED VERSUS ACTUAL BEHAVIOR :
EXPECTED -
After step 4 the example page should only display one "text/plane" data flavor with the content of the last copy-event.
ACTUAL -
After step 4 the example page displays multiple "text/plane" data flavors and an old "text/html" data flavor, which contains old data.
---------- BEGIN SOURCE ----------
Load this html into a JavaFX WebView:
<html>
<head>
<script>
document.addEventListener('paste', e => {
let messages = [];
if (e.clipboardData.types) {
e.clipboardData.types.forEach(type => {
messages.push( type + ": " + e.clipboardData.getData(type));
});
}
document.getElementById("clipboardData").innerHTML = messages.join("<br />");
});
</script>
</head>
<body>
<b>This is a test of the clipboard. The content of the clipboard will be displayed below after pressing ctrl+v:</b>
<div id="clipboardData"></div>
<br/>
<a href="https://evercoder.github.io/clipboard-inspector/">click here to get a better clipboard inspector</a>
</body>
</html>
---------- END SOURCE ----------
FREQUENCY : always
- backported by
-
JDK-8283054 WebView paste event contains old data
- Resolved
-
JDK-8285856 WebView paste event contains old data
- Resolved
-
JDK-8285992 WebView paste event contains old data
- Resolved
- links to
-
Commit openjdk/jfx11u/567685c9
-
Commit openjdk/jfx17u/cc835ba1
-
Commit openjdk/jfx/2338821b
-
Review openjdk/jfx11u/89
-
Review openjdk/jfx17u/46
-
Review openjdk/jfx/729
(4 links to)