Skip to content

Conversation

@m3c-fnicola
Copy link

Cherry pick request of #148988 to stable.

Fixes an issue on Web+Linux that prevents users from inputting data using the numpad.

## Description

This PRs fixes a Web issue on Linux related to numpad keys.
In flutter#145464, I introduced numpad shortcuts for Linux. These shortcuts work well on a desktop Linux application but they broke the Linux+Web numpad logic.

When I added these shortcuts, I expected them to not be active on Web (because I knew that on Web, those shortcuts are handled by the browser). But there is a trick: text editing shortcuts are still defined on Web but they are disabled at the editable text level so one can use them in components that are not `EditableText` (see flutter#103377).
In this PR, I used the same approach than for other text editing shortcuts: when on web associate those shortcuts to the `DoNothingAndStopPropagationTextIntent` intent.

## Related Issue

Fixes flutter#148447.

## Tests

Updates 2 tests.
Adds 2 tests.
@google-cla
Copy link

google-cla bot commented Jun 24, 2024

Thanks for your pull request! It looks like this may be your first contribution to a Google open source project. Before we can look at your pull request, you'll need to sign a Contributor License Agreement (CLA).

View this failed invocation of the CLA check for more information.

For the most up to date status, view the checks section at the bottom of the pull request.

@github-actions github-actions bot added a: text input Entering text in a text field or keyboard related problems framework flutter/packages/flutter repository. See also f: labels. labels Jun 24, 2024
Copy link
Contributor

@justinmc justinmc left a comment

Choose a reason for hiding this comment

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

CP LGTM 👍 This should be a very low risk cherry pick. What do you think @itsjustkevin?

@itsjustkevin
Copy link
Contributor

@justinmc and @m3c-fnicola is there an associated cherry-pick issue with this cherry-pick?

I can't seem to find any information.

@itsjustkevin itsjustkevin added the cp: review Cherry-picks in the review queue label Jul 1, 2024
@itsjustkevin
Copy link
Contributor

@justinmc and @m3c-fnicola is there an associated cherry-pick issue with this cherry-pick?

I can't seem to find any information.

I take it back, found it here 🙃

@itsjustkevin itsjustkevin removed the cp: review Cherry-picks in the review queue label Jul 1, 2024
@itsjustkevin itsjustkevin self-requested a review July 1, 2024 21:26
@itsjustkevin itsjustkevin added the autosubmit Merge PR when tree becomes green via auto submit App label Jul 1, 2024
@auto-submit auto-submit bot merged commit 0054d43 into flutter:flutter-3.22-candidate.0 Jul 1, 2024
engine-flutter-autoroll added a commit to engine-flutter-autoroll/packages that referenced this pull request Jul 18, 2024
engine-flutter-autoroll added a commit to engine-flutter-autoroll/packages that referenced this pull request Jul 18, 2024
engine-flutter-autoroll added a commit to engine-flutter-autoroll/packages that referenced this pull request Jul 19, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

a: text input Entering text in a text field or keyboard related problems autosubmit Merge PR when tree becomes green via auto submit App framework flutter/packages/flutter repository. See also f: labels.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants