Myriad of bugs when decorators do not wrap the decorated text #1327
Description
Do you want to request a feature or report a bug?
bug
What is the current behavior?
Doing character insertion or deletion at the edge of an entity causes the immutable entity to become text.
https://jsfiddle.net/hpeobuvz/2/
This feels highly related to #627 and #1200. I've observed that we only experience issues when the sum length of the text nodes contained in the decorator does not equal the length of the decorated range. Otherwise, the decorated Entity behaves exactly as expected, even when the decoration contains images.
What is the expected behavior?
Inserting a character after an immutable entity does not destroy the entity.
Which versions of Draft.js, and which browser / OS are affected by this issue? Did this work in previous versions of Draft.js?
Seemingly all setups. This has always affected draft.js but in this instance we're using 0.11.0-alpha
.