Re: RFR: 8330462: StringIndexOutOfBoundException when typing anything into TextField [v20]

2024-04-25 Thread Oliver Kopp
On Thu, 25 Apr 2024 15:37:09 GMT, Andy Goryachev wrote: > Nope, this fix breaks Narrator. I think, I do not get what Narrator is doing. If I type "Testx" into a Text field, what should be highlighted? ![image](https://github.com/openjdk/jfx/assets/1366654/690e9331-3a92-4e4f-b6fd-a312f29cc592)

Re: RFR: 8330462: StringIndexOutOfBoundException when typing anything into TextField [v20]

2024-04-25 Thread Andy Goryachev
On Thu, 25 Apr 2024 06:49:24 GMT, Oliver Kopp wrote: > I tested it with a JFX distribution without the fix. Also happens there. Nope, this fix breaks Narrator. The window cursor is moving but the narrator outlines the trailing 't' as Ambarish described. (every time I change branches for the

Re: RFR: 8330462: StringIndexOutOfBoundException when typing anything into TextField [v20]

2024-04-25 Thread Oliver Kopp
On Wed, 24 Apr 2024 15:28:30 GMT, Ambarish Rapte wrote: > Windows Narrator reads only the last character of the Text in a TextArea, > when moving the cursor, and the focus rect does not move with cursor. I tested it with a JFX distribution without the fix. Also happens there. Can you check,

Re: RFR: 8330462: StringIndexOutOfBoundException when typing anything into TextField [v20]

2024-04-24 Thread Ambarish Rapte
On Wed, 24 Apr 2024 12:54:01 GMT, Oliver Kopp wrote: >> Fixes https://bugs.openjdk.org/browse/JDK-8330462. >> >> If the parameter `maxLength` is larger than `Integer.MAX_VALUE - start`, >> then an addition of `start` to it leads to a negative value. This is "fixed" >> by using `Math.max`

Re: RFR: 8330462: StringIndexOutOfBoundException when typing anything into TextField [v20]

2024-04-24 Thread Oliver Kopp
On Wed, 24 Apr 2024 14:35:07 GMT, Ambarish Rapte wrote: > Sorry for jumping in little late. You are jumping in at the perfect time IMHO . (We refined the fix, added working tests meanwhile). - PR Comment: https://git.openjdk.org/jfx/pull/1442#issuecomment-2075129419

Re: RFR: 8330462: StringIndexOutOfBoundException when typing anything into TextField [v20]

2024-04-24 Thread Ambarish Rapte
On Wed, 24 Apr 2024 12:54:01 GMT, Oliver Kopp wrote: >> Fixes https://bugs.openjdk.org/browse/JDK-8330462. >> >> If the parameter `maxLength` is larger than `Integer.MAX_VALUE - start`, >> then an addition of `start` to it leads to a negative value. This is "fixed" >> by using `Math.max`

Re: RFR: 8330462: StringIndexOutOfBoundException when typing anything into TextField [v20]

2024-04-24 Thread Oliver Kopp
> Fixes https://bugs.openjdk.org/browse/JDK-8330462. > > If the parameter `maxLength` is larger than `Integer.MAX_VALUE - start`, then > an addition of `start` to it leads to a negative value. This is "fixed" by > using `Math.max` comparing the `maxLength` and `maxLength + start`. Oliver Kopp