Open StevenMeyer opened 3 years ago
This is a duplicate of #36, but is still happening for us.
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:
text
setSelectionRange()
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.
That would be great!
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
joe.bloggs@example.com
)@
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.