Closed Bug 592424 Opened 14 years ago Closed 11 years ago
_STATE _ACCELTEXT _IS _DERIVED is never removed once set
The code intends to remove it, but doesn't, because of a mistake in one of the patches for bug 190735.
Change in question: http://bonsai.mozilla.org/cvsview2.cgi?diff_mode=context&whitespace_mode=show&root=/cvsroot&subdir=mozilla/layout/xul/base/src&command=DIFF_FRAMESET&file=nsMenuFrame.cpp&rev2=1.251&rev1=1.250 (search for "someone reset the accelText attribute")
This makes it impossible to change a menuitem's acceltext after it's been set at frame construction time, since the attribute changed handler calls BuildAcceleratorText, which doesn't hit the short circuit check for non-derived non-blank values, and therefore clobbers the set value.
test_bug511075 is causing some kind of interference with the test when run in batch-mode (as opposed to individually) - need to investigate that further.
Assignee: nobody → gavin.sharp
Status: NEW → ASSIGNED
I'm also changing the behavior slightly, to allow removing the accelText entirely (i.e. setting to "") - useful for bug 589139. The old code overrides if the attribute is empty/nonexistent - the new code allows setting to "", and requires removing the attribute to have it be reset by BuildAcceleratorText().
Fixed by bug 630830 (http://hg.mozilla.org/mozilla-central/rev/561a1d421cec), but I probably want to spin off a bug for the behavior change because I think that'd be useful.
I'm not going to ever follow up on this...
Assignee: gavin.sharp → nobody
Status: ASSIGNED → RESOLVED
Closed: 11 years ago
Resolution: --- → FIXED
Component: XP Toolkit/Widgets: Menus → XUL
You need to log in before you can comment on or make changes to this bug.