<div>I've recently run into <span>JDK-8149134</span>: when a Text node has been added to a TextFlow, the Text node's selectionStart and selectionEnd properties are interpreted relative to the whole TextFlow rather than the individual span, which means that a selectionFill color may be applied in the wrong place. This prevents rich-text controls implementing the same text-selection appearance as regular TextAreas.<br></div><div><span><br></span></div><div><span>The bug was originally reported against JavaFX 8 but the relevant code appears to behave identically in the current git master.</span></div><div data-darkreader-inline-color="" style="font-family: Arial, sans-serif; font-size: 14px; color: rgb(232, 230, 227); --darkreader-inline-color: #d8d4cf;"><br></div><div><span>I'd like to get this fixed -- it looks like a fairly simple task, as the JBS report already identifies a solution (and I suspect the implementation can be simplified, since the Text.spanOffset function added in the JBS draft patch appears to be recalculating information already available from TextRun.getStart).</span></div><br><div><span>Is anyone already working on this? If not, would it be appropriate at this point for me to update the patch, add tests, and open a PR, or is further discussion required first?<br></span></div><div data-darkreader-inline-color="" style="font-family: Arial, sans-serif; font-size: 14px; color: rgb(232, 230, 227); --darkreader-inline-color: #d8d4cf;"><span><br></span></div><div data-darkreader-inline-color="" style="font-family: Arial, sans-serif; font-size: 14px; color: rgb(232, 230, 227); --darkreader-inline-color: #d8d4cf;"><span>Thanks,<br></span></div><div data-darkreader-inline-color="" style="font-family: Arial, sans-serif; font-size: 14px; color: rgb(232, 230, 227); --darkreader-inline-color: #d8d4cf;"><span><br></span></div><div data-darkreader-inline-color="" style="font-family: Arial, sans-serif; font-size: 14px; color: rgb(232, 230, 227); --darkreader-inline-color: #d8d4cf;"><span>-- Will<br></span></div>