script.evaluate and script.callFunction with userActivation false clear existing user activation
Categories
(Remote Protocol :: WebDriver BiDi, defect, P3)
Tracking
(firefox161 fixed)
| Tracking | Status | |
|---|---|---|
| firefox161 | --- | fixed |
People
(Reporter: jdescottes, Assigned: jdescottes)
References
Details
(Whiteboard: [webdriver:m22][wptsync upstream][webdriver:relnote])
Attachments
(2 external files)
The spec only runs the "activation notification" steps when userActivation is true. When it is false, nothing should happen, and existing transient activation should stay as it is:
https://w3c.github.io/webdriver-bidi/#command-script-callFunction
https://w3c.github.io/webdriver-bidi/#command-script-evaluate
In Firefox, the userActivationEnabled setter of WindowRealm in remote/shared/Realm.sys.mjs remembers the last value for the realm. When the value changes from true to false, it calls document.clearUserGestureActivation(). So a call with userActivation: false clears the activation of the document if the previous call in the same realm used userActivation: true. This also clears activation that came from a real user gesture, or from input actions, between the two calls.
Steps to reproduce:
- Send
script.evaluatewithexpression: "1",userActivation: trueand a context target. - Send
script.evaluatewithexpression: "navigator.userActivation.isActive",userActivation: falseand the same target.
Expected: true, because the activation from step 1 is still active.
Actual: false.
The fix is probably to only call notifyUserGestureActivation() when userActivation is true, and never clear the activation.
Updated•1 month ago
|
| Assignee | ||
Comment 1•1 month ago
|
||
Updated•1 month ago
|
| Assignee | ||
Comment 2•1 month ago
|
||
Comment 4•1 month ago
|
||
| bugherder | ||
https://hg.mozilla.org/mozilla-central/rev/f605f61b5705
https://hg.mozilla.org/mozilla-central/rev/98f920f2b32b
| Assignee | ||
Updated•1 month ago
|
Created web-platform-tests PR https://github.com/web-platform-tests/wpt/pull/64275 for changes under testing/web-platform/tests
Upstream PR merged by moz-wptsync-bot
Updated•7 days ago
|
Description
•