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

Make showPicker consume user activation #10098

Open
wants to merge 3 commits into
base: main
Choose a base branch
from

Conversation

josepharhar
Copy link
Contributor

@josepharhar josepharhar commented Jan 26, 2024

This patch makes showPicker consume user activation rather than just checking for it. Otherwise, the browser can be rendered unusable due to spamming popups.

Fixes #10084

(See WHATWG Working Mode: Changes for more details.)


/input.html ( diff )

@evilpie
Copy link

evilpie commented Jan 29, 2024

Mozilla implementation bug: https://bugzilla.mozilla.org/show_bug.cgi?id=1877148

source Outdated Show resolved Hide resolved
@evilpie
Copy link

evilpie commented Jan 31, 2024

Doesn't this break Step 1. of https://whatpr.org/html/10098/input.html#show-the-picker,-if-applicable ?

If element's relevant global object does not have transient activation, then return.

@josepharhar
Copy link
Contributor Author

Doesn't this break Step 1. of https://whatpr.org/html/10098/input.html#show-the-picker,-if-applicable ?

Ah yes you're right. I moved the user activation consumption to be after the call to "show the picker"

Copy link
Member

@domenic domenic left a comment

Choose a reason for hiding this comment

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

This looks like it works to me. I'll plan to merge it in ~48 hours. @evilpie do you want to give it another double-check?

@domenic domenic self-assigned this Feb 6, 2024
@lukewarlow
Copy link
Member

I think this should wait for the outcome from the discussion regarding picker and user activations.

Specifically I think this might need to move to the main algorithm not just for the showPicker function.

@lukewarlow lukewarlow added the do not merge yet Pull request must not be merged per rationale in comment label Mar 13, 2024
CanadaHonk added a commit to CanadaHonk/html that referenced this pull request May 13, 2024
More in-depth alternative to whatwg#10098. Fixes whatwg#10084, helps GHSA-hr74-5fj7-jgxp.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
do not merge yet Pull request must not be merged per rationale in comment normative change topic: user activation
Development

Successfully merging this pull request may close these issues.

Should showPicker() consume user activation?
4 participants