Skip to content
This repository was archived by the owner on Feb 25, 2025. It is now read-only.

Conversation

@bleroux
Copy link
Contributor

@bleroux bleroux commented Feb 20, 2024

Description

On Web, browsers can emit key events with a logical key sets to Process when the physical key is MetaLeft. Because the modifier state is 0 despite Meta key being pressed this will trigger an assert.
This PR adds some logic for this specific case. Maybe a more slightly broader solution will be needed (using the same logic for all modifiers ?). I focused on MetaLeft because it was directly reported on flutter/flutter#141186.

Related Issue

Fixes flutter/flutter#141186.

Tests

Adds 1 test.

@github-actions github-actions bot added the platform-web Code specifically for the web engine label Feb 20, 2024
@bleroux bleroux changed the title [Web] Update key event when Meta key is seen as Process key [Web] Update modifier state when Meta key is seen as Process key Feb 20, 2024
@bleroux bleroux requested a review from dkwingsmt February 20, 2024 15:02
Copy link
Contributor

@dkwingsmt dkwingsmt left a comment

Choose a reason for hiding this comment

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

LGTM. Yeah I think for such a special corner case, this kind of logic is fine. We can find a more generalized solution if we run into more similar issues.

@bleroux bleroux added the autosubmit Merge PR when tree becomes green via auto submit App label Feb 21, 2024
@auto-submit auto-submit bot merged commit 9100d32 into flutter:main Feb 21, 2024
@bleroux bleroux deleted the web_update_key_event_when_MetaLeft_is_seen_as_Process branch February 21, 2024 05:37
engine-flutter-autoroll added a commit to engine-flutter-autoroll/flutter that referenced this pull request Feb 21, 2024
auto-submit bot pushed a commit to flutter/flutter that referenced this pull request Feb 21, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

autosubmit Merge PR when tree becomes green via auto submit App platform-web Code specifically for the web engine

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[web][windows] Crash when inputing an emoji

2 participants