JDK-8116106 : -fx-highlight-text-fill does not work for multi-line text node
Type:Bug
Component:javafx
Sub-Component:graphics
Affected Version:fx2.0.2
Priority:P3
Status:Closed
Resolution:Fixed
Submitted:2011-10-28
Updated:2015-06-17
Resolved:2011-10-31
The Version table provides details related to the release that this issue/RFE will be addressed.
Unresolved : Release in which this issue/RFE will be addressed. Resolved: Release in which this issue/RFE has been resolved. Fixed : Release in which this issue/RFE has been fixed. The release containing this fix may be available for download as an Early Access Release or a General Availability Release.
This bug came up due to a merge issue, where one line of code was omitted during a code check-in.
This fix is low risk, and only requires one line of code to be changed.
28-10-2011
How to replicate:
Text text1 = new Text("One line");
Text text2 = new Text("Two\nlines");
text1.impl_selectionFillProperty().set(Color.RED);
text1.setImpl_selectionStart(0);
text1.setImpl_selectionEnd(5);
text2.impl_selectionFillProperty().set(Color.RED);
text2.setImpl_selectionStart(0);
text2.setImpl_selectionEnd(5);
The above code showing two Text nodes, one with a single line of text and one with two lines. The highlight works only on the first node.