mirror of
https://github.com/flutter/flutter.git
synced 2026-02-20 02:29:02 +08:00
Check for an empty selection in deleteSurroundingText (flutter/engine#3938)
Fixes https://github.com/flutter/flutter/issues/11437
This commit is contained in:
parent
62108dc53e
commit
dc8f103ca8
@ -90,6 +90,10 @@ class InputConnectionAdaptor extends BaseInputConnection {
|
||||
|
||||
@Override
|
||||
public boolean deleteSurroundingText(int beforeLength, int afterLength) {
|
||||
if (Selection.getSelectionStart(mEditable) == -1 ||
|
||||
Selection.getSelectionStart(mEditable) == -1)
|
||||
return true;
|
||||
|
||||
boolean result = super.deleteSurroundingText(beforeLength, afterLength);
|
||||
updateEditingState();
|
||||
return result;
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user