This pull request solves the caret bug, it was lost when trying to undo and redo actions in some editorJS versions and projects built with development-built tools such as vite. It implements awaits and timers in the caret and blocks operations as suggested here.
Description
This pull request solves the caret bug, it was lost when trying to undo and redo actions in some editorJS versions and projects built with development-built tools such as vite. It implements awaits and timers in the caret and blocks operations as suggested here.
Evidence
Before:
https://github.com/kommitters/editorjs-undo/assets/64106728/1b5a8358-50ac-4b4e-b631-7bc3e3c68c5f
After:
https://github.com/kommitters/editorjs-undo/assets/64106728/bca849ea-284a-410e-88c5-184419e0f731