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
{{ message }}
This repository has been archived by the owner on Jun 15, 2021. It is now read-only.
I've implemented a simple max length plugin for scribe, the idea is to undo the last action/entry of the user, if the content of the editor has exceeded a defined max length. The state of the plugin is rudimentary yet, but it shows my current problem.
The idea is to do a max length check within the 'content-changed' event, and it works fine so far.
But, when I write fast and the length of the editor content crosses the max length, the execution of scribe.undoManager.undo(); results in wrong position of the caret. It jumps to somewhere else, but should stay where it was before, which is usually the last position when typing.
Just start to type something, the backround of the editor will switch to a light blue color and the caret will jump to the beginning from time to time.
This happens in latest Chrome and in latest Firefox. Any ideas how to solve this issue?
The text was updated successfully, but these errors were encountered:
Sign up for freeto subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Hi,
I've implemented a simple max length plugin for scribe, the idea is to undo the last action/entry of the user, if the content of the editor has exceeded a defined max length. The state of the plugin is rudimentary yet, but it shows my current problem.
The idea is to do a max length check within the
'content-changed'
event, and it works fine so far.But, when I write fast and the length of the editor content crosses the max length, the execution of
scribe.undoManager.undo();
results in wrong position of the caret. It jumps to somewhere else, but should stay where it was before, which is usually the last position when typing.You can see an example here:
https://codepen.io/anon/pen/eyJMKB
Just start to type something, the backround of the editor will switch to a light blue color and the caret will jump to the beginning from time to time.
This happens in latest Chrome and in latest Firefox. Any ideas how to solve this issue?
The text was updated successfully, but these errors were encountered: