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
Description
If one tries to edit a text input's value from the middle (or start) of the value the cursor is moved to the end position for the next input. This is only on Safari web browser.
It's a problem with type="email" input elements. According to the spec these inputs don't have setSelectionRange() available.
A solution could be to, for email inputs only:
change the type to text
perform the setSelectionRange()
change the type back to email
If my organisation decides that temporarily using a fork is preferable to fixing our cause for needing trim I may submit this PR myself.
StevenMeyer
changed the title
Cursor moves to end of input on Safari on input event
Cursor moves to end of email input on Safari on input event
Apr 1, 2021
Description
If one tries to edit a text input's value from the middle (or start) of the value the cursor is moved to the end position for the next input. This is only on Safari web browser.
Reproduction steps
[email protected]
)@
symbol)Expected outcome
The new text should be entered at the cursor position and the cursor position should only move with the new input
Actual outcome
The first character is entered at the cursor position. The cursor is moved to the end of the input.
The text was updated successfully, but these errors were encountered: