Closed Bug 456374 Opened 16 years ago Closed 16 years ago

Can't update / set disabled attribute on native submenu

Categories

(Core :: Widget: Cocoa, defect)

x86
macOS
defect
Not set
normal

Tracking

()

RESOLVED FIXED

People

(Reporter: stefanh, Assigned: neil)

References

Details

Attachments

(2 files)

Attached patch test-patchSplinter Review
STR:

1) Apply patch and build
2) Launch Minefield
3) Hit the "Disable Menuitem" and the "Disable Menu" buttons in the statusbar

Expected results: Both "Menuitem" and "Menu" disabled
Actual results: Only "Menuitem" is disabled, even though DOMi tells you that both items are disabled.

Note: If you add the submenu to the Tools menu, you can update/set the attribute - but *only* if you don't open the parent (Tools menu).
Attachment #339780 - Attachment is patch: true
Attachment #339780 - Attachment mime type: application/octet-stream → text/plain
Attached patch Proposed patchSplinter Review
I wrote this patch by code inspection but Stefan says that it fixes the bug for him and also fixes the Insert and Format menus in Thunderbird and SeaMonkey's HTML mail composition window.
Assignee: joshmoz → neil
Status: NEW → ASSIGNED
Attachment #339796 - Flags: superreview?(roc)
Attachment #339796 - Flags: review?(joshmoz)
(In reply to comment #1)
> and also fixes the Insert and Format menus in Thunderbird and SeaMonkey's
> HTML mail composition window.

With Neil's patch: If a top-level menu is disabled, it will still appear enabled in the menubar, but all the children will be disabled (you can open the menu but all items in it are disabled).
The patch basically looks good to me but we'll need a test, which means we have to resolve 446352. This is a bug in the lazy updating behavior.
Attachment #339796 - Flags: superreview?(roc)
I'm writing the tests necessary for this now.
Depends on: 446352
Attachment #339796 - Flags: superreview?(roc)
Attachment #339796 - Flags: review?(joshmoz)
Attachment #339796 - Flags: review+
Attachment #339796 - Flags: superreview?(roc) → superreview+
Pushed changeset fe0fb18e9d72 to mozilla-central.
Status: ASSIGNED → RESOLVED
Closed: 16 years ago
Resolution: --- → FIXED
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: