Input-Text React-18 can't edit text, cursor jumps to end
Expected Behavior
- type in text, move cursor back, can edit text in the middle or on the start
- https://axa-ch-webhub-cloud.github.io/plib-feature/develop/?path=/story/examples-input-text-react--input-text
Current Behavior
- when under React-18, cursor jumps to end of text after the keypress
- probably because of a blur/focus cycle
- all versions of axa-input-text are affected
- only React-18 version is affected
- (works with React-17)
Steps to Reproduce
- https://axa-ch-webhub-cloud.github.io/plib-feature/develop/?path=/story/examples-input-text-react--input-text
- type in text, move cursor back, type a char cursor jumps to end of text
Context (Environment)
- Chrome/Windows
Possible Solution
@MarekLacoAXA I have looked at it and already have a fix. But we should keep an eye on the input text afterwards to see if the fix has side effects or if there are other problems.
Still reproducible when "typing quicky": can by simulated by pressing several (two/three) keys at once repeatedly on the begin of text. Cursor jumps to end. (browser-dependent, doesn't occur in Safari/MacOs, does on Chrome/Win).
Just to mention: PRIOR fixing this issue (with the cursor jumping to the end in React-18): In the following browsers the text field was not unusable at all. The whole content was "randomly jumping" with each keypress: Apple: Safari/MacOs, Chrome+Safari/iOS+iPadOS.