Closed Bug 1732478 Opened 3 years ago Closed 3 years ago

Popups get blocked in resolve handler of requestStorageAccess

Categories

(Core :: Privacy: Anti-Tracking, defect, P1)

defect

Tracking

()

RESOLVED FIXED
95 Branch
Tracking Status
firefox95 --- fixed

People

(Reporter: pbz, Assigned: pbz)

References

()

Details

(Whiteboard: [Fixed by Bug 1733052])

Bug 1491403 introduced a mechanism to pass user activation into the resolver of requestStorageAccess. This enables common use cases, e.g. a website opening a popup after the storage access has been granted.

When testing this mechanism I don't seem to be able to open popups from the resolver method. The popup blocker blocks window.open calls. I suspect this is because we don't have user activation anymore.

Here is my test code (running in a 3rd party iframe):
https://gist.github.com/Trikolon/531597cf73d88b23ae604e12a928aafc

There is a unit test from Bug 1491403 which passes: https://searchfox.org/mozilla-central/rev/f953948db2ac26698487f5fc5c03046c29922f26/toolkit/components/antitracking/test/browser/browser_storageAccessPromiseResolveHandlerUserInteraction.js

Marking this as blocking Bug 1656171, since ideally we'd use this call pattern for the Kinja shim.

Blocks: 1656171
Assignee: nobody → pbz
Priority: -- → P1

Move out of the scope of bug 1677566.

No longer blocks: storage-access-experience
Depends on: 1732953
Summary: Resolve handler of requestStorageAccess does not get user activation → Popups get blocked in resolve handler of requestStorageAccess

This isn't caused by bug 1732953, as popup blocker doesn't use the user-interaction directly, but popup control state.
Bug 1733052 is an intermediate solution to make popup blocker work with new user activation model (timer base).
I think it should fix this as well.

Depends on: 1733052
No longer depends on: 1732953

(In reply to Edgar Chen [:edgar] from comment #3)

This isn't caused by bug 1732953, as popup blocker doesn't use the user-interaction directly, but popup control state.
Bug 1733052 is an intermediate solution to make popup blocker work with new user activation model (timer base).
I think it should fix this as well.

To clarify further, Bug 1732953 is still part of the initial regression, which broke passing the legacy user interaction flag to the promise resolve method. However, once the popup blocker is switched over to the new user activation mechanism, that promise flag will be obsolete.

Status: NEW → RESOLVED
Closed: 3 years ago
Resolution: --- → FIXED
Whiteboard: [Fixed by Bug 1733052]
Target Milestone: --- → 95 Branch
You need to log in before you can comment on or make changes to this bug.