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

web: Fix Enter key being handled as character E #2673

Closed
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Don't ignore unicode characters
  • Loading branch information
johanhelsing committed Feb 6, 2023
commit f62779574de0f99c82f558b5c6c60ad21420206b
2 changes: 1 addition & 1 deletion src/platform_impl/web/web_sys/canvas.rs
Original file line number Diff line number Diff line change
Expand Up @@ -239,7 +239,7 @@ impl Canvas {
event.prevent_default();
}

if event.key().len() > 1 {
if event.key().chars().nth(1).is_some() {
// ignore keypress for "Enter" key etc.
return;
}
Expand Down