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

CfW: fix browser key events consumption #1124

Merged
merged 4 commits into from Feb 22, 2024

Conversation

eymar
Copy link
Collaborator

@eymar eymar commented Feb 20, 2024

Fixes:
JetBrains/compose-multiplatform#4399

Solution:
Introduce new method override fun onKeyboardEventWithResult(event: SkikoKeyboardEvent): Boolean to know whether Compose processed a key event or not.
If Compose processed a key event, then we call preventDefault.

@eymar eymar requested a review from Schahen February 20, 2024 13:55
@eymar eymar marked this pull request as ready for review February 22, 2024 11:12
@eymar eymar changed the title CfW: prototype for conditional preventDefault calls CfW: implement conditional preventDefault calls for Key Events Feb 22, 2024
Copy link
Collaborator

@Schahen Schahen left a comment

Choose a reason for hiding this comment

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

"Request changes" is too strong statement, this is just something to discuss

@eymar eymar merged commit 09c5188 into jb-main Feb 22, 2024
6 checks passed
@eymar eymar deleted the ok/proto_conditional_prevenDefault_solution branch February 22, 2024 17:19
igordmn pushed a commit that referenced this pull request Mar 4, 2024
Introduce new method `override fun onKeyboardEventWithResult(event:
SkikoKeyboardEvent): Boolean` to know whether Compose processed a key
event or not.
If Compose processed a key event, then we call preventDefault.
@eymar eymar added changelog1.6.1 Temporary label for 1.6.1 changelog (will be removed) web labels Mar 12, 2024
@eymar eymar changed the title CfW: implement conditional preventDefault calls for Key Events CfW: fix browser key events consumption Mar 12, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
changelog1.6.1 Temporary label for 1.6.1 changelog (will be removed) web
Projects
None yet
2 participants