Skip to content

Should these APIs consume user activation? #458

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

Open
josepharhar opened this issue Apr 15, 2025 · 0 comments
Open

Should these APIs consume user activation? #458

josepharhar opened this issue Apr 15, 2025 · 0 comments

Comments

@josepharhar
Copy link

The showPicker() method in HTML consumes user activation:

Due to this issue, we might also make showOpenFilePicker and other things consume user activation as well:

aarongable pushed a commit to chromium/chromium that referenced this issue Apr 18, 2025
User activation is consumed in the browser process instead of the
renderer process like input.showPicker() because consuming user
activation in the renderer would make the existing user activation check
in the browser process fail.

There is no browsertest because content::EvalJs() sets user activation
after running script, even with the flag to not run user activation, and
I don't know how to make it stop.

There is no web_test because consuming user activation in the browser
process does not notify the renderer process that it lost user
activation. It does not look like there is any existing interface to
make the browser tell the renderer that it lost user activation, only
the other way around.

I manually verified that the attached bug is fixed.

Spec issue: WICG/file-system-access#458

Fixed: 40059071
Change-Id: Ia1f5ff63a8bdf6cdec70dea1406e9865123f96a5
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/5735618
Reviewed-by: Mustaq Ahmed <[email protected]>
Reviewed-by: Fergal Daly <[email protected]>
Commit-Queue: Joey Arhar <[email protected]>
Cr-Commit-Position: refs/heads/main@{#1448885}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant