fix(android): sync IME selection so typing follows the tapped caret#2746
Merged
Alspb merged 1 commit intoJun 29, 2026
Merged
Conversation
smit-ghl
pushed a commit
to smit-ghl/flutter-quill
that referenced
this pull request
Jul 7, 2026
* chore: fix pre-existing CI analyze failures (singerdmx#2728) * feat: add onFocusReceived implementation for Flutter 3.44 compatibility (singerdmx#2726) Implements the new TextInputClient.onFocusReceived method required by Flutter SDK 3.44+. Returns false as the editor handles focus internally. Co-authored-by: Claude Opus 4.5 <noreply@anthropic.com> * chore(example): update deps, remove CocoaPods integration * chore(release): prepare to publish 11.5.1 * chore(release): prepare to publish 11.5.1 * Complete the Flutter 3.44 / Dart 3.12 migration (singerdmx#2740) * fix(example): repair Android build on Flutter 3.44 and finish the SDK bump * chore(scripts): format only uncommitted Dart files in before_push * fix: resolve Dart 3.12 analyzer warnings and lints * Chore/dart 3.12 format (singerdmx#2744) * style: apply Dart 3.12 format (tall style) * ci: enforce repo-wide dart format + blame-ignore the reformat * fix: normalize list point spacing when toggling RTL formatting (singerdmx#2745) * fix(android): sync IME selection so typing follows the tapped caret (singerdmx#2746) --------- Co-authored-by: Alspb <73047043+Alspb@users.noreply.github.com> Co-authored-by: Jonathan Rezende <jonathan@jode.com.br> Co-authored-by: Claude Opus 4.5 <noreply@anthropic.com> Co-authored-by: Ellet <echo.ellet@gmail.com>
mkmkmk0706
pushed a commit
to mkmkmk0706/flutter-quill
that referenced
this pull request
Jul 10, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description
Fixes an Android-only bug where typing inserted text at the previous caret
position after the caret was moved with a tap/mouse.
Issue
Open the editor → tap a different spot (caret visibly moves there) → type → text lands at the original position, not the
tapped one. Android only.
Reproduces with both the soft keyboard and a hardware keyboard, and only when the caret is moved by tap/mouse — moving it with the keyboard (arrow keys) works.
Root cause
The tapped selection is applied framework-side (
controller.updateSelection) but never pushed to the platform IME._didChangeTextEditingValuecallsupdateRemoteValueIfNeeded()only whenignoreFocus || _keyboardVisible. OnAndroid
_keyboardVisibleisfalsewhile the soft keyboard is hidden (always the case with a hardware keyboard), so after a tap the IME keeps its stale cursor and inserts there.The issue surfaced after the Flutter 3.44 migration, whose Android text-input behavior no longer compensates for the missing
setEditingStateafter a programmatic/tap selection change.Fix
Call
updateRemoteValueIfNeeded()in the keyboard-hidden branch as well.Type of Change