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

Selection isn't passed with isTriggeredByYDoc #138

Open johngodley opened 2 years ago

johngodley commented 2 years ago

When a UPDATE_BLOCKS_WITH_UNDO is triggered and isTriggeredByYDoc is present the selection isn't passed. This has the effect of resetting the selection status in the editor undo history, and when you travel to the point the focus is removed from the editor.

To reproduce:

Looking at the store actions. The selection is passed here:

image

However it isn't here:

image

I'm not sure why the number of blocks would be so different either