Skip to content

Desktop composing region navigation - #85335

Closed
justinmc wants to merge 4 commits into
flutter:masterfrom
justinmc:desktop-composing-controls
Closed

justinmc wants to merge 4 commits into
flutter:masterfrom
justinmc:desktop-composing-controls

Conversation

@justinmc

Copy link
Copy Markdown
Contributor

Previously, Flutter was unable to navigate the native composing tooltip when using the arrow keys on desktop:

Native Mac Flutter Mac
text_edit_composing text_edit_composing_flutter

This PR gets it to work by passing the arrow keys through to the platform when composing.

Fixes #85328

@justinmc justinmc self-assigned this Jun 25, 2021
@flutter-dashboard flutter-dashboard Bot added the framework flutter/packages/flutter repository. See also f: labels. label Jun 25, 2021
@google-cla google-cla Bot added the cla: yes label Jun 25, 2021
@justinmc
justinmc requested a review from cbracken June 25, 2021 18:04

@LongCatIsLooong LongCatIsLooong left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Would it be possible to fix this in the macOS text input plugin? If there's a way on macOS to tell that there's an active candidate view (for multistage input or emojis/accents) then we probably don't want the framework to handle the keyevent first?

// The invoke method will still be called even when consumesKey is false, so if
// it should do nothing when composing, that is up to the implementer to
// enforce.
abstract class _WhenNotComposingTextAction<T extends Intent> extends TextEditingAction<T> {

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Can this be a mixin and we disable the action when there's an active composing region?

@justinmc

Copy link
Copy Markdown
Contributor Author

Yeah this is probably better there in the engine, the key shouldn't come to the framework at all. I'll look into doing it in the engine and will likely close this PR.

@justinmc
justinmc marked this pull request as draft June 30, 2021 22:01
@flutter-dashboard

Copy link
Copy Markdown

This pull request has been changed to a draft. The currently pending flutter-gold status will not be able to resolve until a new commit is pushed or the change is marked ready for review again.

For more guidance, visit Writing a golden file test for package:flutter.

Reviewers: Read the Tree Hygiene page and make sure this patch meets those guidelines before LGTMing.

@goderbauer

Copy link
Copy Markdown
Member

(PR triage): @justinmc Do you still have plans for this PR?

@cbracken

Copy link
Copy Markdown
Member

See the note I added to #85328 for a test case you may want to verify this with.

@justinmc

justinmc commented Aug 2, 2021

Copy link
Copy Markdown
Contributor Author

I'll close this for now while I decide on the best solution.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

framework flutter/packages/flutter repository. See also f: labels.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Can't navigate composing candidates list with arrow keys on Mac

4 participants