Automattic / isolated-block-editor

Repackages Gutenberg's editor playground as a full-featured multi-instance editor that does not require WordPress.
343 stars 50 forks source link

Collab: Fix caret position for undo #130

Closed mirka closed 2 years ago

mirka commented 2 years ago

Caret positions on undo regressed at some point. This PR fixes the restoration of caret positions after undo actions.

Unfortunately this is not really testable in jsdom (#129).

To test

  1. yarn storybook and go to the collab editor story.
  2. Type "hello", pause for a second or so, then type "world".
  3. Undo.
  4. Your caret should be positioned after the word "hello", as expected.