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

popup: close popup on escape press. #6978

Merged
merged 4 commits into from
Dec 3, 2024
Merged

Conversation

FloVanGH
Copy link
Member

@FloVanGH FloVanGH commented Dec 2, 2024

No description provided.

@FloVanGH FloVanGH requested a review from ogoffart December 2, 2024 16:36
Copy link
Member

@ogoffart ogoffart left a comment

Choose a reason for hiding this comment

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

I'd put the esc handler after the key_event handler (together with the Tab/Backtab handling a few lines down.

Can you please extend the test in https://github.com/slint-ui/slint/blob/master/tests/cases/elements/popupwindow_close_policy.slint to make sure esc close the popup when it should, and doesn't close whan it shouldn't

internal/common/enums.rs Outdated Show resolved Hide resolved
Co-authored-by: Arnold Loubriat <datatriny@gmail.com>
@FloVanGH FloVanGH force-pushed the florian/close-policy-esc branch from 4c7e0fd to 08b44dd Compare December 3, 2024 06:25
@FloVanGH FloVanGH force-pushed the florian/close-policy-esc branch from 08b44dd to e4b124a Compare December 3, 2024 06:37
@FloVanGH FloVanGH requested a review from ogoffart December 3, 2024 07:40
Copy link
Member

@ogoffart ogoffart left a comment

Choose a reason for hiding this comment

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

Looks good to me, but the test coverage could be improved (see comment)

@FloVanGH FloVanGH merged commit 0bd242c into master Dec 3, 2024
37 checks passed
@FloVanGH FloVanGH deleted the florian/close-policy-esc branch December 3, 2024 13:46
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants