-
Bug
-
Resolution: Cannot Reproduce
-
P3
-
None
-
8u172
-
x86
-
os_x
FULL PRODUCT VERSION :
java version "1.8.0_172-ea"
Java(TM) SE Runtime Environment (build 1.8.0_172-ea-b03)
Java HotSpot(TM) 64-Bit Server VM (build 25.172-b03, mixed mode)
ADDITIONAL OS VERSION INFORMATION :
macOS 10.12.6
A DESCRIPTION OF THE PROBLEM :
Pressing ALT-RIGHT, ALT-LEFT, ALT-SHIFT-RIGHT and ALT-SHIFT-LEFT should jump one word in the given direction. It works fine in Google Chrome and Safari and Java 1.8.0_144. But it doesn't work in 1.8.0_162 and 1.8.0_172. There it jumps two words instead.
REGRESSION. Last worked in version 8u151
ADDITIONAL REGRESSION INFORMATION:
java version "1.8.0_144"
Java(TM) SE Runtime Environment (build 1.8.0_144-b01)
Java HotSpot(TM) 64-Bit Server VM (build 25.144-b01, mixed mode)
STEPS TO FOLLOW TO REPRODUCE THE PROBLEM :
Enter text, e.g. "This is a test." into an HTMLEditor. Then place the cursor e.g. at the beginning and press ALT-RIGHT.
EXPECTED VERSUS ACTUAL BEHAVIOR :
EXPECTED -
The cursor should jump to the end of "This", i.e. the cursor should be after "This".
ACTUAL -
The cursor jumps to the end of "is", i.e. it is after "is". The cursor jumped two words instead of one.
REPRODUCIBILITY :
This bug can be reproduced always.
---------- BEGIN SOURCE ----------
public class Controller implements Initializable {
public HTMLEditor htmlEditor;
@Override
public void initialize(URL location, ResourceBundle resources) {
htmlEditor.setHtmlText("<html>\n" +
"<head>\n" +
" <meta http-equiv=\"Content-Type\" content=\"text/html; charset=utf-8\">\n" +
"</head>\n" +
"<body style=\"font-family: san-serif\">\n" +
"<p>This is a test.</p>\n" +
"</body>\n" +
"</html>");
}
public void onPrintConsole(ActionEvent actionEvent) {
System.out.println(htmlEditor.getHtmlText());
}
}
and
<BorderPane maxHeight="-Infinity" maxWidth="-Infinity" minHeight="-Infinity" minWidth="-Infinity" prefHeight="433.0" prefWidth="671.0" xmlns="http://javafx.com/javafx/8" xmlns:fx="http://javafx.com/fxml/1" fx:controller="sample.bug4_htmleditor.Controller">
<center>
<HTMLEditor fx:id="htmlEditor" />
</center>
<bottom>
<ToolBar prefHeight="40.0" prefWidth="200.0" BorderPane.alignment="CENTER">
<items>
<Button mnemonicParsing="false" onAction="#onPrintConsole" text="Print to console" />
</items>
</ToolBar>
</bottom>
</BorderPane>
---------- END SOURCE ----------
java version "1.8.0_172-ea"
Java(TM) SE Runtime Environment (build 1.8.0_172-ea-b03)
Java HotSpot(TM) 64-Bit Server VM (build 25.172-b03, mixed mode)
ADDITIONAL OS VERSION INFORMATION :
macOS 10.12.6
A DESCRIPTION OF THE PROBLEM :
Pressing ALT-RIGHT, ALT-LEFT, ALT-SHIFT-RIGHT and ALT-SHIFT-LEFT should jump one word in the given direction. It works fine in Google Chrome and Safari and Java 1.8.0_144. But it doesn't work in 1.8.0_162 and 1.8.0_172. There it jumps two words instead.
REGRESSION. Last worked in version 8u151
ADDITIONAL REGRESSION INFORMATION:
java version "1.8.0_144"
Java(TM) SE Runtime Environment (build 1.8.0_144-b01)
Java HotSpot(TM) 64-Bit Server VM (build 25.144-b01, mixed mode)
STEPS TO FOLLOW TO REPRODUCE THE PROBLEM :
Enter text, e.g. "This is a test." into an HTMLEditor. Then place the cursor e.g. at the beginning and press ALT-RIGHT.
EXPECTED VERSUS ACTUAL BEHAVIOR :
EXPECTED -
The cursor should jump to the end of "This", i.e. the cursor should be after "This".
ACTUAL -
The cursor jumps to the end of "is", i.e. it is after "is". The cursor jumped two words instead of one.
REPRODUCIBILITY :
This bug can be reproduced always.
---------- BEGIN SOURCE ----------
public class Controller implements Initializable {
public HTMLEditor htmlEditor;
@Override
public void initialize(URL location, ResourceBundle resources) {
htmlEditor.setHtmlText("<html>\n" +
"<head>\n" +
" <meta http-equiv=\"Content-Type\" content=\"text/html; charset=utf-8\">\n" +
"</head>\n" +
"<body style=\"font-family: san-serif\">\n" +
"<p>This is a test.</p>\n" +
"</body>\n" +
"</html>");
}
public void onPrintConsole(ActionEvent actionEvent) {
System.out.println(htmlEditor.getHtmlText());
}
}
and
<BorderPane maxHeight="-Infinity" maxWidth="-Infinity" minHeight="-Infinity" minWidth="-Infinity" prefHeight="433.0" prefWidth="671.0" xmlns="http://javafx.com/javafx/8" xmlns:fx="http://javafx.com/fxml/1" fx:controller="sample.bug4_htmleditor.Controller">
<center>
<HTMLEditor fx:id="htmlEditor" />
</center>
<bottom>
<ToolBar prefHeight="40.0" prefWidth="200.0" BorderPane.alignment="CENTER">
<items>
<Button mnemonicParsing="false" onAction="#onPrintConsole" text="Print to console" />
</items>
</ToolBar>
</bottom>
</BorderPane>
---------- END SOURCE ----------