Menus in context "selection" not working in Thunderbird Add-on
Categories
(Thunderbird :: Add-Ons: Extensions API, defect)
Tracking
(Not tracked)
People
(Reporter: ed-elric, Unassigned)
References
Details
User Agent: Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/68.0.3440.75 Safari/537.36
Steps to reproduce:
Go to Gebugging Firefox tools in Thunderbird and try to load temporary add-on with a manifest.json with { "permissions": ["menus"]}. In js-file try to create menus: browser.menus.create({
id: "some_id",
title: "custom item",
contexts: ["selection"],
onclick: some_function
});
Actual results:
I've got an error rigth after loading my temporary add-on:
"Reading manifest: Error processing permissions.0: Value "menus" must either: must either [must either [be one of ["clipboardRead"..."
Shortly saying TB doesn't support "menus" api key. Same addon works perfectly fine in Firefox browser. In console I see: TypeError: browser.menus is undefined.
Expected results:
I would like to add custom menu item to the context menu. Official TB documentation https://buildmedia.readthedocs.org/media/pdf/thunderbird-webextensions/latest/thunderbird-webextensions.pdf says it should work, but it doesn't.
Updated•5 years ago
|
Comment 1•5 years ago
|
||
What version of Thunderbird are you using?
(In reply to Geoff Lankow (:darktrojan) from comment #1)
What version of Thunderbird are you using?
I'm using 60.8.0
Comment 3•5 years ago
|
||
The menus API and most of the other APIs are not in Thunderbird 60. They are in Thunderbird 68, which is very nearly here.
So now I've tried it with 68.0 and 68.0b5 and it's still not working.
Updated•5 years ago
|
Comment 5•5 years ago
|
||
This must be working or the test for it would be failing, not to mention the add-ons I have installed that use it. I'm not sure what you're doing wrong but it's not a bug, at least not as described here.
(In reply to Geoff Lankow (:darktrojan) from comment #5)
This must be working or the test for it would be failing, not to mention the add-ons I have installed that use it. I'm not sure what you're doing wrong but it's not a bug, at least not as described here.
Thank you for the example, it seems to be the issue with the "selection" context. I wanted my context menu item to appear when part of a page is selected, but nothing was happening. With your example it shows that the context is still "page", not "selection" when I select some text in the email.
Updated•5 years ago
|
Comment 7•5 years ago
|
||
I think this will be solved by fixing bug 1504475, which I am really hoping to find time to do soon.
Updated•5 years ago
|
Description
•