Reproduction steps
- use a keyboard with text selection, such as Google Gboard
- open chat anywhere in Fluxer Beta mobile app and type something
- enter selection mode
- press the arrows
Observed behaviour
my cursor moves as expected, but doesn't select along the way, and even discards any active selection. (when pressing the equivalents of
Home/End, it selects all the way to the start or end of the message, though. only arrows behave incorrectly)Build information
Version 2026.10.100, Beta 2, Channel Beta, Build 2590, Android 17 (arm64), Device Google Pixel 9a, Locale en-US, Push unifiedpush, Flutter 3.47.6, Dart 3.13.5
Platform
Android
Evidence
Details
Expected behaviour
the text should be selected under my cursor, so long as i am in select mode
6 comments
Comment by mesub
Comment by Dinosaur Gnatalie
Comment by Jinx
Comment by Charles W (K5CDW)
- Gboard selection mode: text editing panel → Select → ← moves the cursor but selects nothing. |← and Select all do select. Reproduced several times.
- Shift+Left key event over adb (
- Not specific to the composer: the same thing happens in the channel search field.
- Control: in a native text field (the Microsoft Edge address bar), both the adb Shift+Left and Gboard's selection-mode ← select one character per press.
Root cause: a Flutter regression, flutter/flutter#185849 (P1, open, no fix PR yet), introduced by flutter/flutter#185292 ("[Android] Gboard Text Shift Stuck Fix"). Since that change, the Android embedder (adb shell input keycombination SHIFT_LEFT DPAD_LEFT, ×4): the cursor moves 4 characters and nothing is selected. Typing a character afterwards inserts it at the cursor (hello world Xtest) instead of replacing a selection.KeyEmbedderResponder.synchronizePressingKey) no longer synthesizes a Shift press frommetaStateforVIRTUAL_KEYBOARDevents. Gboard's selection-mode arrows only carryMETA_SHIFT_ON, so the framework handles them as plain arrows and just moves the cursor. Fluxer builds on Flutter 3.47.x are affected. That probably explains why other keyboards (FUTO etc.) don't show it: they set the selection directly instead of sending Shift+arrow. The same regression is behind Ctrl shortcuts from FUTO breaking on 3.47 (reported in the Flutter issue). Possible app-side workaround until Flutter fixes it:ImeEditingShortcutBridge.ktalready works around the Ctrl half of this regression for virtual keyboards. ExtendingimeEditingShortcutFor()so Shift+DPAD_LEFT/RIGHT/UP/DOWN (no other modifiers) map to new kinds sent over the samefluxer_app/ime_editing_shortcutchannel, and mapping those intextEditingIntentFor()toExtendSelectionByCharacterIntent/ExtendSelectionVerticallyToAdjacentLineIntentwithcollapseSelection: false, should restore selection in every text field.FluxerClipboardScope.handleTextEditingShortcutjust needs to returnignoredfor the new kinds so they fall through to the default actions.2-edge-shift-left.png
1440×3120 | 287 kB Link to 2-edge-shift-left.png
4-official-after-X.png
1440×3120 | 386 kB Link to 4-official-after-X.png
6-search-after-X.png
1440×3120 | 224 kB Link to 6-search-after-X.png
Comment by Charles W (K5CDW)
Follow-up to my comment above: a workaround tested on a device
Short version: the real fix belongs in Flutter, not Fluxer (flutter/flutter#185849, a regression in Flutter's Android key handling since 3.47). Fluxer can't fix the root cause in the app itself. The bug clears up once Flutter ships a fix and Fluxer moves to that release. Until then, the stopgap below restores Gboard selection in Fluxer, if you want to ship something in the meantime. Correction to my earlier suggestion In my last comment I suggested extendingImeEditingShortcutBridge.kt. I built and tested that on a device, and it doesn't work. With the keyboard open, Gboard's arrows reach Flutter through the IME's input connection (InputConnectionAdaptor.sendKeyEvent→KeyboardManager) and never go throughActivity.dispatchKeyEvent, where the bridge sits. Stopgap that works- Wrap
- For Shift+DPAD ←→↑↓ from the virtual keyboard, with no Ctrl/Alt/Meta, run
- Steps aside by itself: it only acts while
- Caveat: it relies on the deprecated raw key API. That's the only place the Shift flag is still visible on the Dart side, which is another reason it should be temporary.
Testing (same device and keyboard as above; self-built fromServicesBinding.instance.keyEventManager.keyMessageHandler. Flutter drops Shift before building theKeyEvent, but the raw Android event (RawKeyEventDataAndroid) still has it inmetaState, withdeviceId == -1.ExtendSelectionByCharacterIntent/ExtendSelectionVerticallyToAdjacentLineIntent(collapseSelection: false) on the focused field and mark the event handled. This reuses the existingTextEditingShortcutKind/performTextEditingShortcutplumbing.HardwareKeyboard.instance.isShiftPressedis false. Once Flutter fixes #185849 and the framework sees Shift again, events fall through to Flutter's default text editing shortcuts, so the workaround can simply be deleted later. Physical keyboards are never affected.canary022f1249, build 3021, Flutter 3.47.9)- Unit + widget tests: the mapping, extending a real
- On the phone:
- Gboard selection-mode ← / → select and shrink the selection one character at a time, in the composer and in channel search.
- adb Shift+Left ×4 selects
- Plain arrows, |←, Select all, and Gboard's change-case (⇧ on a selection) behave as before.
The patch is about 280 lines, mostly tests: one new file (TextFieldfrom a raw Shift+Left message, and stepping aside when Shift is already pressed. They pass alongside the existing text-input tests, and the analyzer and formatter are clean.test.virtual_keyboard_shift_arrows.dart) plus small changes totext_editing_shortcuts.dart,fluxer_clipboard_scope.dartandmain.dart. Happy to share it or open a PR. Either way, aComment by Charles W (K5CDW)
- One commit on current
- Device-tested as described above.
- Diff against canary: https://github.com/fluxerapp/flutter_client/compare/canary...sdjrdriver:flutter_client:fix/gboard-shift-arrow-selection
I'll open the PR once I have Fluxer Labs access. Just a reminder that this is only a stopgap: the real fix is in Flutter (flutter/flutter#185849), and the workaround steps aside by itself once Flutter ships it.canary(6 files, +278/−1, mostly tests), DCO signed-off and signed.dart format,flutter analyzeand thetest/features/ui/input/tests pass on that base.