forked from firka/flutter
Check for an empty selection in deleteSurroundingText (flutter/engine#3938)
Fixes https://github.com/flutter/flutter/issues/11437
This commit is contained in:
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user