menuitem type="checkbox" has been implemented by overloading the meaning of a menuitem with an icon




18 years ago
9 years ago


(Reporter: Andrew Thompson, Unassigned)


Dependency tree / graph

Firefox Tracking Flags

(Not tracked)



(1 attachment)



18 years ago
This bug will certainly effect the Mac classic skin, but its likely to show up in 
all the platform skins and is effectively latently present in the Modern skin.

Essentially, menu items with checkmarks appear to have been implemented by 
setting the menuitem's icon to be the checkmark. This is my best guess, and its 
born out by widget-toolkit/global/content/xul.css which binds <menuitem type=
"checkbox" and type="radiobutton> to the menuitemiconic behaviour.

The problem with this should be obvious:

Menuitems can consist of the follwing

[Checkmark] [Icon] [Text] [Submenu Arrow/Shortcut Key]

AFAICT what seems to have been implemented is:

[Checkmark/Icon] [Text] [Submenu Arrow/Shortcut Key]

So one cannot have a menu item that has an icon and is also a checkbox. For an 
example of such a menu see Nav 4's Move To menu in Messenger on the Mac.

This has other nasty side effects. For example, the fix I attached to bug: which makes the Mac classic 
skin display the bookmarks menu in the personal toolbar correctly, has the side 
effect that it messes up the Sidebar->Add menu because it indents the check marks 
because they're implemented by setting the menu's icon (as far as I can tell).

I think this is going to need to be fixed in the XUL rather than in any skin. One 
needs to be able to treat the checkmark and the menu's icon as two seperate 
entities. The indenting issue alone will certainly effect Mac Classic, and 
probably Windows and Linux Classic and eventually Modern. 

The loss of the ability to have checkmarks and an icon in a menuitem will hit all 
platforms, and expecially Messenger.

Comment 1

18 years ago
Heh. I knew bad assumptions like this would start surfacing when the Mac Classic 
skin was developed ... Adding `skins' keyword.
Keywords: skins
OS: Mac System 9.0 → All
I'll start taking a look at this, but it's a very good candidate for getting 
Ever confirmed: true
Target Milestone: --- → M23


18 years ago
Blocks: 46175
do we have _any_ checklist menus that also have icons?
Target Milestone: M23 → Future

Comment 4

18 years ago
Not currently, at least not in navigator or messenger as far as I can tell.  But 
if we ever wish to copy the 4.x look in the classic skin completely, then we 
would.  You can see this in 4.x: Launch Messenger, click on "Message" in the 
menubar, then mouseover "Move Message".  A menu of folders with their names, 
icons, and checkmarks appears.
wow, i'd never ever ever seen that menu! ;)


18 years ago
Keywords: skins

Comment 6

17 years ago
When this is fixed, remove workaround in widget/src/mac/nsMenuItem::create

(well, this is true assuming I land bug 46177 some day...)
giving back to toolkit for triage
Assignee: pinkerton → hyatt
Target Milestone: Future → ---

Comment 8

17 years ago
Over to hewitt.  Actually the original menu code kept them separate, and somehow
this got lost in the move to XBL.

Assignee: hyatt → hewitt


17 years ago
Target Milestone: --- → mozilla0.9.7

Comment 9

17 years ago
This could get ugly.  menus try to keep all their parts in alignment, which is
why all text has a big margin-left - to keep space for an icon. If we have a
checkbox, AND an icon, where do they fit? On windows, I've seen examples where
instead of using a checkbox, the icon background gets a depressed look when it
is checked.

Target Milestone: mozilla0.9.7 → Future

Comment 10

17 years ago
On Mac OS, there's room left to the left of the icon for a checkmark. I'll attach 
a little PNG. We fake this space in the Mac version of the classic look and feel 
with a big left margin (or padding - I did it a long time ago and I don't 

Would it be possible to alter the structure of the XUL to nest 2 boxes of 
whatever kind are presently used... Then perhaps we can be flexible enough to 
allow this to be altered on a per skin or per platform basis as needed. If a 
platform doesn't want this, style the outer box into oblivion.

We'd need some rules (any maybe javascript) to make sure the checkbox effect is 
applied in the right place (ie, on the outer box if in use, else on the inner 

An interesting question is, if you go and look at the mail & news menus 
referenced in the comments on 4.X on Windows, what do you see? How do they model 
the mailboxes that have both icons and checkmarks on 4.X on Mac OS?


Comment 11

17 years ago
Created attachment 60034 [details]
Screenshot showing how it looks on Mac OS X (classic is similar)

Comment 12

14 years ago
screenshot is from 2001, what is it's status now?
Is this a Mac only thing? From which version does this screenshot come?
Assignee: hewitt → nobody
QA Contact: jrgmorrison → xptoolkit.menus
Blocks: 347461
Blocks: 347462
Blocks: 340977


10 years ago
Component: XP Toolkit/Widgets: Menus → XUL
QA Contact: xptoolkit.menus → xptoolkit.widgets
You need to log in before you can comment on or make changes to this bug.