Add partial backspace support to editOnInput for Android devices#1067
Add partial backspace support to editOnInput for Android devices#1067mmmoussa wants to merge 1 commit intofacebookarchive:masterfrom
Conversation
|
"It does this by detecting whether the start of the selection is a mutable entity, and if it's not, falling back to the backspace method normally used as part of the keyDown event handler."
|
|
So some ideas from our meeting:
Hope that is helpful, and sorry that we're not prepared to merge this change. |
sophiebits
left a comment
There was a problem hiding this comment.
(switching away from github review labels; requesting changes to match earlier review above)
|
Since we never resolved the questions and problems with this PR, and nobody is currently working on fixing the known issues with Android web, I'm closing this. |
Summary
This pr addresses two parts of the problem raised in #1066.
The first part is that it adds support for entity deletion within editOnInput. It does this by detecting whether the start of the selection is a mutable entity, and if it's not, falling back to the backspace method normally used as part of the keyDown event handler.
The second part is that it identifies cases where the selection is incorrect and then corrects it before falling back on the backspace method. The correction is performed by using the end of the DOM's selection as the start of the selection to evaluate, and the end of the last editor state's selection as the end of the selection to evaluate.
Known issues
The backspace selection range cannot be correctly determined when the starting selection edge is in the middle of a span. In such cases, the span containing the starting selection edge does not have any of its contents deleted, and temporarily the DOM selection understanding is incorrect until the cursor is moved.