Skip to content
This repository was archived by the owner on Feb 6, 2023. It is now read-only.
This repository was archived by the owner on Feb 6, 2023. It is now read-only.

Immutable and segmented entity content is not deleted correctly when at the edge of a selection #1063

@mmmoussa

Description

@mmmoussa

Do you want to request a feature or report a bug?
Bug

What is the current behavior?
When deleting after having made a selection that contains part of an immutable or segmented entity, the entity status of the entity is correctly removed but the text within it is not deleted.

If the current behavior is a bug, please provide the steps to reproduce and if possible a minimal demo of the problem. You can use this jsfiddle to get started: https://jsfiddle.net/stopachka/m6z0xn4r/.
Visit the draft.js entity example here: http://codepen.io/Kiwka/pen/wgpOoZ. Using the cursor, make a selection that includes part of the immutable "Superman" entity and some of the text that follows it (eg. "erman. Dele"). Click backspace.

What is the expected behavior?
The text within the entity should be deleted in accordance with the entity's deletion rules. In the case of the immutable entity example, all text within the entity should be deleted.

Which versions of Draft.js, and which browser / OS are affected by this issue? Did this work in previous versions of Draft.js?
All versions of Draft.js are affected on all browser / OS combinations. This bug did not work previously.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions