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
Caret should be at position 2 (i.e. 12|345) because it is forced there after every change with setSelectionRange
Use arrow or mouse to move caret to position 5 (i.e. 12345|).
Press backspace
Caret goes to position 4 (i.e. 1234|)
What is the expected behavior?
Caret should obey setSelectionRange and go to position 2 even after backspace on IE10.
Which versions of React, and which browser / OS are affected by this issue? Did this work in previous versions of React?
This bug started at React v15.0.0. React v14.8 did not have this problem.
This issue was reported here text-mask/text-mask#133. @Heymdall found out that if you wrap setSelectionRange in a setTimeout(..., 0), it sets the position correctly, though the user would have to type slowly to ensure this always happens, so that is not a workaround.
The text was updated successfully, but these errors were encountered:
Do you want to request a feature or report a bug?
Report a bug.
What is the current behavior?
2
(i.e.12|345
) because it is forced there after every change withsetSelectionRange
5
(i.e.12345|
).4
(i.e.1234|
)What is the expected behavior?
Caret should obey
setSelectionRange
and go to position2
even after backspace on IE10.Which versions of React, and which browser / OS are affected by this issue? Did this work in previous versions of React?
This bug started at React v15.0.0. React v14.8 did not have this problem.
This issue was reported here text-mask/text-mask#133. @Heymdall found out that if you wrap
setSelectionRange
in asetTimeout(..., 0)
, it sets the position correctly, though the user would have to type slowly to ensure this always happens, so that is not a workaround.The text was updated successfully, but these errors were encountered: