Skip to content

Undoing "remove" on an atomic block restores the selection in the wrong location #141

@thibaudcolas

Description

@thibaudcolas

Bug. On "undo" after removing an atomic block (image/embed "Remove" using onRemoveEntity), the selection should be restored where it was before:

What is the current behavior?

image-remove-selection-undo

What is the expected behavior?

Selection should be on the right of ggg.

Which versions of Draftail + Draft.js, and which browser / OS are affected by this issue? Did this work in previous versions of Draftail or Draft.js?

This comes with bb740ab. I haven't found a way to implement this for wagtail/wagtail#4296 without this issue.

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions