Open
Bug 461899
Opened 16 years ago
Updated 2 years ago
menu should support popup attribute
Categories
(Core :: XUL, enhancement)
Core
XUL
Tracking
()
NEW
People
(Reporter: myk, Unassigned)
Details
Attachments
(2 files)
(deleted),
application/vnd.mozilla.xul+xml
|
Details | |
(deleted),
patch
|
enndeakin
:
review-
|
Details | Diff | Splinter Review |
The <menu> element only supports a <menupopup> child element for specifying its popup, it doesn't also support the 'popup' attribute. Support for the 'popup' attribute would be useful, because it would allow the same popup to be shared by both a menu (f.e. a submenu of the Tools menu) and a toolbar button.
I've attached a testcase demonstrating the problem.
Reporter | ||
Comment 1•16 years ago
|
||
Note: bug 314020 should be fixed concurrently with this bug.
Hi,
yes I was fighting with this issue recently and I completely agree. It would prevent from duplicating a same menu in several places, especially when this menu is changing during execution of the program (so having to duplicate this menu means you have to take care of always add/remove items in all menus in same time, with high risk of synchronization bugs with the software growing up).
A "workaround" is to use for instance a "button" element instead of a "menu" element, but then you have to take care of the appearance position of the menu as well as the style of this button (to look like a menu), but this will be a problem depending of your platform/theme.
If this can be fixed, it would be great.
Thanks.
Updated•16 years ago
|
Assignee: jag → nobody
Comment 3•15 years ago
|
||
Just ran into the same cul-de-sac, which meant quite a lot of code duplication. :-(
Comment 4•14 years ago
|
||
Can anyone suggest a reviewer for this patch (Roc, Boris)?
Attachment #456959 -
Flags: review?
Comment 5•14 years ago
|
||
enndeakin would be the right reviewer.
Updated•14 years ago
|
Attachment #456959 -
Flags: review? → review?(enndeakin)
Comment 6•14 years ago
|
||
Comment on attachment 456959 [details] [diff] [review]
Add support for "popup" attribute on a menu element
Unfortunately, it's not as simple as this.
There are a number of places which assume that a menu's popup is a direct child and/or that a menupopup will have a menuframe parent when it is a menu.
For instance, a simple test with this patch shows issues the the 'open' state isn't updated correctly, and the submenus don't disappear properly when moving the mouse away from them.
Also note that nsMenuFrame references mPopupFrame directly and doesn't go through GetPopup, so it will retrieve a different frame.
Attachment #456959 -
Flags: review?(enndeakin) → review-
Updated•2 years ago
|
Severity: normal → S3
You need to log in
before you can comment on or make changes to this bug.
Description
•