Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

All Popup overloads call dismiss on Esc key by default #712

Merged
merged 8 commits into from Jul 27, 2023

Conversation

MatkovIvan
Copy link
Member

@MatkovIvan MatkovIvan commented Jul 26, 2023

Proposed Changes

  • Override key event on old desktop Popup to match default behaviour - It calls onDismissRequest on Esc key by default now.
  • Expose (internally) root modifier instead of key events from SkiaBasedOwner. It allows not only optimize modifier count, but also applying semantics into root node
  • Make KeyInputElement internal to reduce modifier count on pair keyboard events

Testing

Test: create Popup via old overload, it closes by Esc now. Consume event to prevent this

@MatkovIvan MatkovIvan force-pushed the ivan.matkov/owner-key-events branch from 2569705 to 9be340c Compare July 26, 2023 14:51
@MatkovIvan MatkovIvan force-pushed the ivan.matkov/owner-key-events branch from 9be340c to cc776f2 Compare July 27, 2023 09:57
@MatkovIvan MatkovIvan merged commit a103d7d into jb-main Jul 27, 2023
2 checks passed
@MatkovIvan MatkovIvan deleted the ivan.matkov/owner-key-events branch July 27, 2023 12:29
igordmn pushed a commit that referenced this pull request Nov 15, 2023
…` key by default (#712)

* Expose root modifier instead of key events

* Use only one element for key input

* Handle Esc by default in existing Popup

* Create onKeyEvent modifier only if needed

* Revert EmptySemanticsElement

* Remove handling Esc key explicitly

* Add dismiss Popup by Esc tests

* Move dismissOnEsc to separate modifier
igordmn pushed a commit that referenced this pull request Jan 30, 2024
* Expose root modifier instead of key events

* Use only one element for key input

* Handle Esc by default in existing Popup

* Create onKeyEvent modifier only if needed

* Revert EmptySemanticsElement

* Remove handling Esc key explicitly

* Add dismiss Popup by Esc tests

* Move dismissOnEsc to separate modifier
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
2 participants