59 bytes, text/x-review-board-request
While working on bug 1316020, Blake noticed that child items of a submenu don't show up if you don't specify the context. According to our current docs (and implementation), the default context if omitted is "page", which Kris thinks we should change. My current best idea is: - if the menu item has a parent, - and it doesn't have an explicit context set, - but the parent has then: - the child menu item should inherit the context. Not sure how likely this change is to break existing extensions.
Assignee: nobody → lgreco
Priority: -- → P1
Whiteboard: [tab context]
Attachment #8820926 - Flags: review?(kmaglione+bmo)
The attached patch pushed to try: - https://treeherder.mozilla.org/#/jobs?repo=try&revision=75ae7315acf91a1dfa652824a52013785ee52f8d
Status: NEW → ASSIGNED
Hey Andy, you meant to WONTFIX this in bug 1266455 comment 6. Wanna double-check this?
My main concern was breaking the compat. with Chrome for something that could be specified manually. If I read this correctly, if you specify it all manually correctly it all works well. It's just the default case where its not specified that would be good to get right. I took a bit more time to read this and had a quick play around and it sounds like whilst your suggestion is different from Chrome, it is a perfectly reasonable and sane solution. Perhaps I was too hasty in my comment on bug 1266455. This solution in comment 0 seems reasonable to me.
Comment on attachment 8820926 [details] Bug 1324429 - Context menu items without contexts should inherit it from their parent. https://reviewboard.mozilla.org/r/100320/#review104296
Attachment #8820926 - Flags: review?(kmaglione+bmo) → review+
There shouldn't be any compatibility issues. The current default context is "all", which works the same as this approach for in-page context menus. The only place where it makes a difference is in things like tab and page_action menus.
Pushed by firstname.lastname@example.org: https://hg.mozilla.org/integration/autoland/rev/4926f3ca5c90 Context menu items without contexts should inherit it from their parent. r=kmag
Status: ASSIGNED → RESOLVED
Last Resolved: 2 years ago
status-firefox53: --- → fixed
Resolution: --- → FIXED
Target Milestone: --- → mozilla53
I've updated: https://developer.mozilla.org/en-US/Add-ons/WebExtensions/API/contextMenus/create Please let me know if this covers it.
Looks great, thanks Will.
You need to log in before you can comment on or make changes to this bug.