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

Should keyup be an activation triggering input event? #10301

Open
zcorpan opened this issue Apr 26, 2024 · 0 comments
Open

Should keyup be an activation triggering input event? #10301

zcorpan opened this issue Apr 26, 2024 · 0 comments
Labels
interop Implementations are not interoperable with each other topic: user activation

Comments

@zcorpan
Copy link
Member

zcorpan commented Apr 26, 2024

What is the issue with the HTML Standard?

See https://software.hixie.ch/utilities/js/live-dom-viewer/saved/12660

keydown is an activation triggering input event, but keyup is not. For the Enter key, the activation happens on keydown, but when pressing Space on a button, the activation happens on keyup.

Per spec and in Firefox, if you turn off repeating keys in the OS and hold space for 5 seconds or more, the popup is blocked. In Safari and Chrome the popup is not blocked.

This might not be an issue in general since users don't typically hold keys for so long, but the website might be busy running scripts and the user might be on a slow device (and maybe running a screen reader which can make things slower still), so it's still plausible that some users get blocked popups (or denied other activation-gated features).

What happens in WebKit and Chromium?

Giving websites two activations for one keypress seems bad, though, but maybe there's a way to extend the activation timer if it wasn't consumed since keydown or so.

cc @CanadaHonk

@zcorpan zcorpan added interop Implementations are not interoperable with each other topic: user activation labels Apr 26, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
interop Implementations are not interoperable with each other topic: user activation
Development

No branches or pull requests

1 participant