action.openPopup() should reject if another panel or context menu is open
Categories
(WebExtensions :: General, defect)
Tracking
(firefox149 fixed, firefox150 fixed)
People
(Reporter: robwu, Assigned: robwu)
References
Details
(Whiteboard: [addons-jira])
Attachments
(2 files)
|
48 bytes,
text/x-phabricator-request
|
Details | Review | |
|
48 bytes,
text/x-phabricator-request
|
phab-bot
:
approval-mozilla-beta+
|
Details | Review |
To avoid disrupting or confusing the user, the action.openPopup() method should reject the request if other UI is floating around in the window.
We already check that for extension-generated panels, but it makes sense to extend this to other UI, notably context menus, doorhangers and notifications.
The existing error message was intentionally chosen to allow for this possibility, "openPopup() cannot be called while another panel is open".
Updated•29 days ago
|
| Assignee | ||
Comment 1•29 days ago
|
||
| Assignee | ||
Comment 2•29 days ago
|
||
Marking as blocker of bug 1799344 to signal that the behavior here is intended to be the behavior of action.openPopup() when the ability to call it without user interaction ships to release for the first time.
Comment 4•28 days ago
|
||
| bugherder | ||
| Assignee | ||
Comment 5•28 days ago
|
||
On top of the original revision, this also includes a hidden pref
(extensions.openPopup.undoBug2022281) to allow users to undo the
change if they encounter an issue for any reason.
Original Revision: https://phabricator.services.mozilla.com/D286943
Updated•28 days ago
|
Comment 6•28 days ago
|
||
firefox-beta Uplift Approval Request
- User impact if declined: Bug 1799344, riding the 149 train, dropped the user interaction requirement for the
action.openPopup()method, which allows extensions to open the extension popup at any time. To prevent it from being disruptive or abused, this patch rejects the API call if a menu or panel is open. - Code covered by automated testing: yes
- Fix verified in Nightly: yes
- Needs manual QE test: no
- Steps to reproduce for manual QE testing:
- Risk associated with taking this patch: low
- Explanation of risk level: In theory, extensions could see their attempt to call
action.openPopup()fail more often (with user gesture, which existed before 149), if there is other UI in the way (e.g. a doorhanger). As a work-around, users can manually click on the extension button to open its popup. Or if that does not work for any reason, they can temporarily opt out of the tighter restrictions (for 149) by setting theextensions.openPopup.undoBug2022281pref to true. - String changes made/needed: No
- Is Android affected?: no
Updated•28 days ago
|
Updated•28 days ago
|
Description
•