Closed
Bug 1339172
Opened 9 years ago
Closed 8 years ago
Remove context menu listeners when removing context menus
Categories
(WebExtensions :: Untriaged, defect, P5)
Tracking
(Not tracked)
RESOLVED
INVALID
| webextensions | + |
People
(Reporter: geoffreydebelie, Unassigned)
References
Details
(Keywords: stale-bug, Whiteboard: [contextmenus, triaged])
Attachments
(1 file)
|
804 bytes,
application/octet-stream
|
Details |
User Agent: Mozilla/5.0 (X11; Linux x86_64; rv:54.0) Gecko/20100101 Firefox/54.0
Build ID: 20170212110301
Steps to reproduce:
If you remove context menus using browser.contextMenus.removeAll(), it does not remove the listeners attached to those context menu items.
So if you create context menu items with the same id as the ones who were deleted, the listeners are still attached.
This is a feature request to remove all the listeners that are attached to the context menu items that are being deleted.
| Reporter | ||
Updated•9 years ago
|
Component: Untriaged → WebExtensions: Untriaged
Product: Firefox → Toolkit
Updated•9 years ago
|
Assignee: nobody → mwein
Priority: -- → P1
Whiteboard: [contextmenus, triaged]
Updated•9 years ago
|
webextensions: --- → ?
Updated•9 years ago
|
webextensions: ? → +
Summary: WebExtension: remove context menu listeners when removing context menus → Remove context menu listeners when removing context menus
Updated•8 years ago
|
Status: UNCONFIRMED → ASSIGNED
Ever confirmed: true
Comment 1•8 years ago
|
||
I believe this bug is invalid, as the code found here - http://searchfox.org/mozilla-central/source/browser/components/extensions/ext-c-menus.js#156 - should prevent this from ever happening.
Geoffrey, if you believe this is still an issue, could you please provide a sample webextension which reproduces the issue? I was unable to reproduce it locally.
Status: ASSIGNED → RESOLVED
Closed: 8 years ago
Flags: needinfo?(geoffreydebelie)
Resolution: --- → INVALID
| Reporter | ||
Comment 2•8 years ago
|
||
Test addon showing the problem. It shouldn't log anything when you click the context menu items, but they still have a listener attached so they log their ID.
Flags: needinfo?(geoffreydebelie) → needinfo?(matthewjwein)
| Reporter | ||
Updated•8 years ago
|
Status: RESOLVED → REOPENED
Flags: needinfo?(matthewjwein)
Resolution: INVALID → ---
Keywords: stale-bug
Comment 3•8 years ago
|
||
This bug makes no sense to me. If you add a listener, it has nothing to do with specific menu items or how many of them exist. If you want to remove the listener, there's an API for that.
The test addon doesn't receive onclick events for the removed menu items, it does for the new menu items you added.
Assignee: matthewjwein → nobody
Status: REOPENED → RESOLVED
Closed: 8 years ago → 8 years ago
Priority: P1 → P5
Resolution: --- → INVALID
Updated•7 years ago
|
Product: Toolkit → WebExtensions
You need to log in
before you can comment on or make changes to this bug.
Description
•