Closed Bug 75516 Opened 24 years ago Closed 24 years ago

Support for new "command=" syntax does not handle "type=checkbox/radio" menu items

Categories

(Core :: XUL, defect)

defect
Not set
normal

Tracking

()

VERIFIED FIXED
mozilla0.9.1

People

(Reporter: markh, Assigned: hyatt)

Details

Attachments

(3 files)

Bug 71470 added special support to menu items to support the new "command=" syntax. This support copies the "disabled" and "value" attributes into the menu from the command. However, this broke any menuitems with 'type="checkbox"' that use the command update mechanism, as the "checked" state does not work correctly. There appear to be no menu items in the Mozilla code base that use the command mechanism to update their "checked=" state - all such menu items do not use "observes" (now "command"), but update the state directly. However Komodo does use the command infrastructure for such menu items. Attaching a patch that also copies the "checked" attribute from the command into the menu item before display. Adding Hyatt and Pinkerton to the CC list as they seemed to be the main drivers in 71470 (sorry guys!)
Mark, the patch is good. YOu also need to patch the native Mac menu code over in widget/src/mac.
Assignee: trudelle → hyatt
The changes look okay, but what would this mean for Mozilla? It looks like we'd need to move the checked state to the <command/>, otherwise the absence of it will override what's in the <menuitem/>. Or we need to treat it the way the value attribute is treated.
Jag is, as usual, correct :) It did indeed break a couple of checkbox menus in Moz. Attaching a new patch to treat it the way the value attribute is treated.
Status: NEW → ASSIGNED
Target Milestone: --- → mozilla0.9.1
Fixed.
Status: ASSIGNED → RESOLVED
Closed: 24 years ago
Resolution: --- → FIXED
Works for me. Thx!
Status: RESOLVED → VERIFIED
Component: XP Toolkit/Widgets: XUL → XUL
QA Contact: jrgmorrison → xptoolkit.widgets
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: