You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When directly editing the date in the Inputfield, the cursor jumps to the end after every key press, easy to see when trying to edit text at the start or middle
Expected Behavior
Edit the Inputfield date directly, expecting the cursor to stay in place after a key press
Current Behavior
Editing part of the date in the Inputfield somewhere in the middle or start will cause the cursor to jump to the end after an input
Similar behaviour has occurred on the Input-Text component before, as described in this issue.
A fix was made for the Input-Text component, though it isn't perfect as mentioned in this comment, still would be nice to have as a temporary fix for the DatePicker component also.
The text was updated successfully, but these errors were encountered:
Background: React's troublesome idea of fighting with native built-in HTML elements - i.e. controlled components - is the likely cause for the behaviour you report. As you also report, it is inconsistent among browsers and/or OSes.
So, why don't you try this: Just never set the value property, instead use defaultValue if you need to preset an initial value. Please report back here whether this works for you.
When directly editing the date in the Inputfield, the cursor jumps to the end after every key press, easy to see when trying to edit text at the start or middle
Expected Behavior
Current Behavior
Steps to Reproduce
https://axa-ch-webhub-cloud.github.io/plib-feature/develop/?path=/story/examples-datepicker-react--datepicker-controlled-inputfield
Context (Environment)
OS: RHEL8
Browser: Firefox
DatePicker version: any/latest
Possible Solution
Similar behaviour has occurred on the Input-Text component before, as described in this issue.
A fix was made for the Input-Text component, though it isn't perfect as mentioned in this comment, still would be nice to have as a temporary fix for the DatePicker component also.
The text was updated successfully, but these errors were encountered: