browser.menus.onClicked handler fails when the background script has been stopped (Non-persistent background scripts)
Categories
(Thunderbird :: Add-Ons: Extensions API, defect)
Tracking
(thunderbird_esr115 wontfix)
| Tracking | Status | |
|---|---|---|
| thunderbird_esr115 | --- | wontfix |
People
(Reporter: standard8, Assigned: john)
Details
Attachments
(2 files)
STR
- Install the attached add-on as a temporary add-on.
- Right click on any folder in the main tab and select "analyse dmarc results".
=> At this stage a new tab is correctly opened to prove it works.
- Close the tab, then on the debugging add-ons page, terminate the background script of the add-on.
- Right click on any folder in the main tab and select "analyse dmarc results".
Expected Results
The tab is opened
Actual Results
The tab fails to open because the handler wasn't called.
In Thunderbird 115 this error is thrown:
TypeError: linkedBrowser is null ext-menus.js:1415:13
In Thunderbird 127.0a1 it is:
TypeError: can't access property "getTabForBrowser", linkedBrowser.ownerGlobal.gBrowser is undefined ext-menus.js:1456:13
Running the menu item a second time works, because by that time the background script has started.
| Reporter | ||
Comment 1•1 year ago
|
||
Updated•1 year ago
|
| Assignee | ||
Comment 2•1 year ago
|
||
There is a much greater issue discovered here. The check for linkedBrowser is coming from m-c code, where every tab has one. However, a mail3pane tab, which is not displaying a message, will not have a linked browser. You can reproduce that by selecting a message and then deselect it again (having a white empty area instead of a message). The onClicked event will then not fire as well.
The fix for this issue will look different. I thank you for bringing this to my attention. If you are ok with it, I will move forward and propose a different fix.
| Reporter | ||
Comment 3•1 year ago
|
||
(In reply to John Bieling (:TbSync) from comment #2)
The fix for this issue will look different. I thank you for bringing this to my attention. If you are ok with it, I will move forward and propose a different fix.
Ah yes, I forgot about those. Feel free to steal :)
Updated•1 year ago
|
Updated•1 year ago
|
Updated•1 year ago
|
| Assignee | ||
Updated•1 year ago
|
Pushed by mkmelin@iki.fi:
https://hg.mozilla.org/comm-central/rev/1fe01ebb00d5
Fix issue with browser.menus.onClicked not working when the background script has been stopped. r=standard8
Updated•1 year ago
|
Description
•