-
|
Hello. In my app i noticed that focus on fields works differently in modal (with OverlayScrollbars) and outside a modal After focus on input in modal cursor moves at end but in chrome focus on password field moves cursor at end Does OverlayScrollbars moves caret in inputs? |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 4 replies
-
|
Good day @krutoo OverlayScrollbars has no code related to moving the caret position inside an input.. OverlayScrollbars only has a tiny bit of "focus management" code so that keyboard accessibility is not lost during initialization or scrolling by clicking / interacting with the scrollbars. |
Beta Was this translation helpful? Give feedback.
@krutoo This seems to be a "bug" or side effect of chrome.. I couldn't observe any difference in the two inputs inside of Firefox.
Here is what I found out:
OverlayScrollbars measures the viewport container after a mutation. Exactly this measurement causes the caret position to not reset for some reason.
You can simulate this by adding some kind of measuring code at the end of your
clicklistener: