html icon indicating copy to clipboard operation
html copied to clipboard

Make showPicker consume user activation

Open josepharhar opened this issue 1 year ago • 3 comments

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 https://github.com/whatwg/html/issues/10084

  • [x] At least two implementers are interested (and none opposed):
  • [x] Tests are written and can be reviewed and commented upon at:
    • https://github.com/web-platform-tests/wpt/pull/44181
  • [ ] Implementation bugs are filed:
    • Chromium: https://chromium-review.googlesource.com/c/chromium/src/+/5235516
    • Gecko: https://bugzilla.mozilla.org/show_bug.cgi?id=1877148
    • WebKit: …
  • [x] MDN issue is filed: I don't think this needs MDN updates
  • [x] The top of this comment includes a clear commit message to use.

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


/input.html ( diff )

josepharhar avatar Jan 26 '24 22:01 josepharhar

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

evilpie avatar Jan 29 '24 11:01 evilpie

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.

evilpie avatar Jan 31 '24 16:01 evilpie

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"

josepharhar avatar Feb 01 '24 16:02 josepharhar

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 avatar Mar 13 '24 13:03 lukewarlow

Let's duplicate this into #10344.

annevk avatar May 28 '24 16:05 annevk