A weird behavior of selection shape and selected text fill color can be seen in TextArea while selection using mouse (selection using keyboard is prevented by JDK-8296266), as can be seen in the attached video clip.
To reproduce:
- run MonkeyTester https://github.com/andy-goryachev-oracle/MonkeyTest , select TextArea page
- select Text: 'Failed Nav Bug'
- select Font: (blank) or System Regular
- click on the first character (on the right) in the Arabic word العربية (\u0627\u0644\u0639\u0631\u0628\u064a\u0629)
- drag the mouse to the left to select characters one by one
Two things can be observed (referring to the steps 4 and 5 in the attached image):
1. blue selection rectangle does not change
2. inverted text selection color does change
That is, text selection fill color decouples from the rectangular selection shape.
The problem *might* be with the System font, setting another font (Tahoma, or Al Nile, Noto Sans Arabic Bold) fixes the issue.
This issue is not reproducible on Windows.