On Thu, 19 Oct 2023 22:51:01 GMT, Andy Goryachev <ango...@openjdk.org> wrote:
>> Because of a missing conditional check in the `updateTextPos()`, the >> `textTranslateX` value was not getting updated when TextField size was >> changed as a result of resizing window. >> >> Updated the CENTER and LEFT cases in the `updateTextPos()` method to fix the >> issue. >> >> The fix can be validated using MonkeyTester. >> Steps to select TextField option in Monkey Tester. >> >> - Open the MonkeyTester app and select TextField from the left option pane. >> - Select Long from Text selection option and TOP_LEFT from Alignment >> dropdown. >> - After above step, follow the steps given in the bug to validate the fix in >> monkey tester. > > The scenario I was referring to was when expanding the width of the > TextField. As it tries to reposition the text, the movement is jerky - try > setting the cursor to left of the last character and compare it with when you > set the cursor at the right of the last character (the end of the text). The > latter is smooth(er). > > Then try to compare the same scenario with JTextField (Tools -> > JTextArea/JTextField Embedded in SwingNode, you might need to git pull > https://github.com/andy-goryachev-oracle/MonkeyTest) > > Swing does it much smoother because I suspect it tries not to allow for blank > space at the end of the field. > > I am suggesting we might try doing something that would make the overall > experience a bit smoother, if possible. But if it is too much work, the fix > in this PR can still be considered an improvement. I get it now. Thanks for the details @andy-goryachev-oracle . I'll work on it and see how I can improve the proposed solution. ------------- PR Comment: https://git.openjdk.org/jfx/pull/1263#issuecomment-1772085381