-
Bug
-
Resolution: Unresolved
-
P4
-
8u51, 9, 10
-
x86_64
-
linux
FULL PRODUCT VERSION :
java version "1.8.0_51"
Java(TM) SE Runtime Environment (build 1.8.0_51-b16)
Java HotSpot(TM) 64-Bit Server VM (build 25.51-b03, mixed mode)
ADDITIONAL OS VERSION INFORMATION :
Linux 3.13.0-61-generic #100-Ubuntu SMP Wed Jul 29 11:21:34 UTC 2015 x86_64 x86_64 x86_64 GNU/Linux
EXTRA RELEVANT SYSTEM CONFIGURATION :
Using Firefox 39.0
A DESCRIPTION OF THE PROBLEM :
When copying text in Firefox and then pasting it into a JavaFX Node the String returned from Clipboard.getSystemClipboard().getHtml() is garbage.
Can be tested with the HTMLEditor class.
Copying the same content into OpenOffice Writer works as expected.
STEPS TO FOLLOW TO REPRODUCE THE PROBLEM :
Create a simple Application containing only a HTMLEditor() instance and copy & paste content from
a Webpage openend in Firefox.
public class CopyAndPasteTest extends Application
{
@Override
public void start(Stage primaryStage) throws Exception {
primaryStage.setScene(new Scene(new HTMLEditor()));
primaryStage.setTitle("Copy & Paste Data from Firefox");
primaryStage.show();
}
}
EXPECTED VERSUS ACTUAL BEHAVIOR :
EXPECTED -
Text selected and copied in Firefox should be shown in the HTMLEditor after pasting.
The text should be styled as shown in Firefox.
ACTUAL -
Illegible Characters are pasted into HTMLEditor, e.g. "ÿþ<"
REPRODUCIBILITY :
This bug can be reproduced always.
---------- BEGIN SOURCE ----------
import javafx.application.Application;
import javafx.scene.Scene;
import javafx.scene.web.HTMLEditor;
import javafx.stage.Stage;
public class CopyAndPasteTest extends Application
{
@Override
public void start(Stage primaryStage) throws Exception {
primaryStage.setScene(new Scene(new HTMLEditor()));
primaryStage.setTitle("Copy & Paste Data from Firefox");
primaryStage.show();
}
}
---------- END SOURCE ----------
java version "1.8.0_51"
Java(TM) SE Runtime Environment (build 1.8.0_51-b16)
Java HotSpot(TM) 64-Bit Server VM (build 25.51-b03, mixed mode)
ADDITIONAL OS VERSION INFORMATION :
Linux 3.13.0-61-generic #100-Ubuntu SMP Wed Jul 29 11:21:34 UTC 2015 x86_64 x86_64 x86_64 GNU/Linux
EXTRA RELEVANT SYSTEM CONFIGURATION :
Using Firefox 39.0
A DESCRIPTION OF THE PROBLEM :
When copying text in Firefox and then pasting it into a JavaFX Node the String returned from Clipboard.getSystemClipboard().getHtml() is garbage.
Can be tested with the HTMLEditor class.
Copying the same content into OpenOffice Writer works as expected.
STEPS TO FOLLOW TO REPRODUCE THE PROBLEM :
Create a simple Application containing only a HTMLEditor() instance and copy & paste content from
a Webpage openend in Firefox.
public class CopyAndPasteTest extends Application
{
@Override
public void start(Stage primaryStage) throws Exception {
primaryStage.setScene(new Scene(new HTMLEditor()));
primaryStage.setTitle("Copy & Paste Data from Firefox");
primaryStage.show();
}
}
EXPECTED VERSUS ACTUAL BEHAVIOR :
EXPECTED -
Text selected and copied in Firefox should be shown in the HTMLEditor after pasting.
The text should be styled as shown in Firefox.
ACTUAL -
Illegible Characters are pasted into HTMLEditor, e.g. "ÿþ<"
REPRODUCIBILITY :
This bug can be reproduced always.
---------- BEGIN SOURCE ----------
import javafx.application.Application;
import javafx.scene.Scene;
import javafx.scene.web.HTMLEditor;
import javafx.stage.Stage;
public class CopyAndPasteTest extends Application
{
@Override
public void start(Stage primaryStage) throws Exception {
primaryStage.setScene(new Scene(new HTMLEditor()));
primaryStage.setTitle("Copy & Paste Data from Firefox");
primaryStage.show();
}
}
---------- END SOURCE ----------
- duplicates
-
JDK-8170082 JavaFX clipboard erroneously supposes that text/??? are UTF-8
- Closed
- is blocked by
-
JDK-8179597 Handle cut and paste of 1, 2 and 4 byte characters
- Resolved