Closed jimmynguyc closed 7 years ago
This problem is reproducible on http://slatejs.org/#/emojis.
Screencast: http://recordit.co/RUJliirLNR
Platform: macOS Sierra 10.12.6 Browser: Chrome 61.0.3163.100(Official Build)
Failure happens when a line begins with a void node + some texts, go to end of line, cmd + backspace.
It fails at https://github.com/ianstormtaylor/slate/blob/master/packages/slate/src/changes/at-range.js#L428 when node = document.getNextText(parent.key) returns undefined on #L423.
node = document.getNextText(parent.key)
undefined
Also, correct me if I'm wrong, but if I'm deleting backwards shouldn't the final focus be the one before the void node (if any)? So maybe getPreviousSubling(parent.key) instead?
getPreviousSubling(parent.key)
Thanks @doodlewind @ianstormtaylor :)
This problem is reproducible on http://slatejs.org/#/emojis.
Screencast: http://recordit.co/RUJliirLNR
Platform: macOS Sierra 10.12.6 Browser: Chrome 61.0.3163.100(Official Build)
Failure happens when a line begins with a void node + some texts, go to end of line, cmd + backspace.
It fails at https://github.com/ianstormtaylor/slate/blob/master/packages/slate/src/changes/at-range.js#L428 when
node = document.getNextText(parent.key)
returnsundefined
on #L423.Also, correct me if I'm wrong, but if I'm deleting backwards shouldn't the final focus be the one before the void node (if any)? So maybe
getPreviousSubling(parent.key)
instead?