This repository was archived by the owner on Feb 25, 2025. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 6k
Implement handling of framework-handled key events #23655
Merged
fluttergithubbot
merged 2 commits into
flutter:master
from
gspencergoog:web_delayed_keys
Jan 20, 2021
Merged
Implement handling of framework-handled key events #23655
fluttergithubbot
merged 2 commits into
flutter:master
from
gspencergoog:web_delayed_keys
Jan 20, 2021
Conversation
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
mdebbar
reviewed
Jan 13, 2021
Comment on lines
130
to
140
| _messageCodec.encodeMessage(eventData), (ByteData? data) { | ||
| if (data == null) { | ||
| return; | ||
| } | ||
| final String response = utf8.decode(data.buffer.asUint8List()); | ||
| final Map<String, dynamic> jsonResponse = json.decode(response); | ||
| if (jsonResponse['handled'] as bool) { | ||
| // If the framework handled it, then don't propagate it any further. | ||
| event.preventDefault(); | ||
| } | ||
| }, | ||
| ); |
Contributor
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
FYI this file is being heavily refactored in #23466.
Contributor
Author
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yeah, I'm quite aware (and Tong knows I'm working on this).
13 tasks
c78e68c to
03dfc7c
Compare
Contributor
Author
|
@mdebbar OK, this is ready for review, if you have the time. |
mdebbar
approved these changes
Jan 14, 2021
80fdf5b to
17927b9
Compare
17927b9 to
9686d66
Compare
gspencergoog
added a commit
to gspencergoog/engine
that referenced
this pull request
Jan 20, 2021
engine-flutter-autoroll
added a commit
to engine-flutter-autoroll/flutter
that referenced
this pull request
Jan 20, 2021
engine-flutter-autoroll
added a commit
to engine-flutter-autoroll/flutter
that referenced
this pull request
Jan 20, 2021
engine-flutter-autoroll
added a commit
to engine-flutter-autoroll/flutter
that referenced
this pull request
Jan 20, 2021
engine-flutter-autoroll
added a commit
to engine-flutter-autoroll/flutter
that referenced
this pull request
Jan 20, 2021
engine-flutter-autoroll
added a commit
to engine-flutter-autoroll/flutter
that referenced
this pull request
Jan 20, 2021
engine-flutter-autoroll
added a commit
to engine-flutter-autoroll/flutter
that referenced
this pull request
Jan 20, 2021
engine-flutter-autoroll
added a commit
to engine-flutter-autoroll/flutter
that referenced
this pull request
Jan 20, 2021
engine-flutter-autoroll
added a commit
to engine-flutter-autoroll/flutter
that referenced
this pull request
Jan 20, 2021
engine-flutter-autoroll
added a commit
to engine-flutter-autoroll/flutter
that referenced
this pull request
Jan 20, 2021
engine-flutter-autoroll
added a commit
to engine-flutter-autoroll/flutter
that referenced
this pull request
Jan 20, 2021
engine-flutter-autoroll
added a commit
to engine-flutter-autoroll/flutter
that referenced
this pull request
Jan 20, 2021
zanderso
pushed a commit
to flutter/flutter
that referenced
this pull request
Jan 20, 2021
* d4a7358 Roll Dart SDK from c4214e6daaac to 4a6764bf28c2 (4 revisions) (flutter/engine#23770) * 9bc776a [web] Add --watch flag to 'felt test' (flutter/engine#23727) * 247ebc2 Roll Skia from bde06cc511d2 to f3087d8297fe (7 revisions) (flutter/engine#23772) * 8b27e6f skip flaky test (flutter/engine#23775) * 2927e9f block thread merging with shared engines (flutter/engine#23733) * df5f3b0 Implement handling of framework-handled key events (flutter/engine#23655) * f205ced Roll Skia from f3087d8297fe to e0fe62adaa3e (9 revisions) (flutter/engine#23781) * fa7aebf Roll Skia from e0fe62adaa3e to 18aeb5731b51 (1 revision) (flutter/engine#23784) * 9acfb7d Fix JNI void vs object method call (flutter/engine#23785) * df13ccf Roll Skia from 18aeb5731b51 to 7aa7f039b9ee (1 revision) (flutter/engine#23786) * e3e3b2b Roll Fuchsia Mac SDK from pc_veLlry... to xYraItnQp... (flutter/engine#23787) * 8a096d6 ci: Print output in case of compile error (flutter/engine#23522) * f1c3ced Roll Fuchsia Linux SDK from fByXAJ76e... to vs54lOVoj... (flutter/engine#23788) * 0c79393 Revert "Roll Dart SDK from c4214e6daaac to 4a6764bf28c2 (4 revisions) (#23770)" (flutter/engine#23791)
hjfreyer
pushed a commit
to hjfreyer/engine
that referenced
this pull request
Mar 22, 2021
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Labels
cla: yes
waiting for tree to go green
This PR is approved and tested, but waiting for the tree to be green to land.
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
This implements the "Delayed event delivery" that I've implemented for the other platforms.
Because they require synchronous responses, other platforms need to re-dispatch events that weren't handled by the framework once it responds, but the web just needs to call
preventDefaulton the events that the framework handles, since it all happens in the same thread anyhow.Related Issues
Tests
preventDefaultcalled on them (and vice versa).Breaking Change