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
fix(caret): caret not resetting position on quick restart (@nadalaba) (#7038)
- quick restarting immediately after some input makes the caret fail to
reset its position sometimes.
https://github.com/user-attachments/assets/d9e1def5-d8f6-4af2-845c-778c89279849
this happens because the reset of caret's position that should happen on
the callback inside `requestAnimationFrame` in `caret.goTo()` (triggered
in `TestUI.updateWordsWrapperClasses()`) is cancelled by a later call to
`caret.goTo()` (triggered by `TestUI.focusWords()`). However the second
call sets the position directly without stopping previous animation
`$('#caret').stop().animate()`. As a result, the earlier animation
(caused by last input) continues after the reset, if the restart was
done fast enough.
- update some previous comments.
0 commit comments