未验证 提交 a2f488ac 编写于 作者: J Jason Simmons 提交者: GitHub

Do not report a cursor location if there is no active selection (#4427)

Fixes https://github.com/flutter/flutter/issues/13398
上级 1cdaab88
......@@ -140,8 +140,8 @@ public class TextInputPlugin implements MethodCallHandler {
outAttrs.imeOptions |= enterAction;
InputConnectionAdaptor connection = new InputConnectionAdaptor(view, mClient, mFlutterChannel, mEditable);
outAttrs.initialSelStart = Math.max(Selection.getSelectionStart(mEditable), 0);
outAttrs.initialSelEnd = Math.max(Selection.getSelectionEnd(mEditable), 0);
outAttrs.initialSelStart = Selection.getSelectionStart(mEditable);
outAttrs.initialSelEnd = Selection.getSelectionEnd(mEditable);
return connection;
}
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册