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

Passive event listener for keyboard and prevent_default #1285

Closed
ghpu opened this issue Jun 3, 2020 · 0 comments · Fixed by #1286
Closed

Passive event listener for keyboard and prevent_default #1285

ghpu opened this issue Jun 3, 2020 · 0 comments · Fixed by #1286
Labels

Comments

@ghpu
Copy link
Contributor

ghpu commented Jun 3, 2020

KeyboardService generates passive events, so it cannot be used with prevent_default ().

Proposed change :
line 142 of keyboard.rs : KeyListenerHandle(EventListener::new(element.as_ref(), event, listener))
should probably be KeyListenerHandle(EventListener::new_with_options(element.as_ref(), event, EventListenerOptions::enable_prevent_default(),listener))

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant