Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update editing state in InputConnectionAdaptor.setSelection #17652

Merged

Conversation

jason-simmons
Copy link
Member

The BaseInputConnection superclass does not call endBatchEdit
in setSelection and therefore does not implicitly cause
InputConnectionAdaptor to send a state update.

Some input modes such as numeric keypads will not function without
these updates.

@@ -286,7 +286,7 @@ private boolean isSamsung() {
@Override
public boolean setSelection(int start, int end) {
boolean result = super.setSelection(start, end);
markDirty();
updateEditingState();
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The markDirty() should be called as well before the updateEditingState() to make sure it is not accidentally treated as a repeat call.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

done

Copy link
Contributor

@GaryQian GaryQian left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM, mod above comment, thanks for catching this!

The BaseInputConnection superclass does not call endBatchEdit
in setSelection and therefore does not implicitly cause
InputConnectionAdaptor to send a state update.

Some input modes such as numeric keypads will not function without
these updates.
@jason-simmons jason-simmons merged commit beb8a7e into flutter:master Apr 12, 2020
engine-flutter-autoroll added a commit to engine-flutter-autoroll/flutter that referenced this pull request Apr 12, 2020
goderbauer pushed a commit to goderbauer/engine that referenced this pull request Apr 16, 2020
…17652)

The BaseInputConnection superclass does not call endBatchEdit
in setSelection and therefore does not implicitly cause
InputConnectionAdaptor to send a state update.

Some input modes such as numeric keypads will not function without
these updates.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
3 participants