If you call a simple time-wasting function (such as alert("foo")) before each setAttribute('hidden', 'true'), the problem goes away. That's why I think it's a race condition.
presumably the menu believes it's still open...
Yes, what happens is that the menu frame hides the menu, fires the command event and then closes the menu. Unfortunately it can't do that if you destroy the frame (by setting the hidden attribute) first.
So is it documented anywhere how menus _should_ work? I can't figure out half the insanity they do (setting attributes from layout, firing events from layout, etc).
This is an automated message, with ID "auto-resolve01". This bug has had no comments for a long time. Statistically, we have found that bug reports that have not been confirmed by a second user after three months are highly unlikely to be the source of a fix to the code. While your input is very important to us, our resources are limited and so we are asking for your help in focussing our efforts. If you can still reproduce this problem in the latest version of the product (see below for how to obtain a copy) or, for feature requests, if it's not present in the latest version and you still believe we should implement it, please visit the URL of this bug (given at the top of this mail) and add a comment to that effect, giving more reproduction information if you have it. If it is not a problem any longer, you need take no action. If this bug is not changed in any way in the next two weeks, it will be automatically resolved. Thank you for your help in this matter. The latest beta releases can be obtained from: Firefox: http://www.mozilla.org/projects/firefox/ Thunderbird: http://www.mozilla.org/products/thunderbird/releases/1.5beta1.html Seamonkey: http://www.mozilla.org/projects/seamonkey/
Behavior is even worse in Firefox (1.0.6) on Linux. Initially BOTH menus appear (i.e., the hidden attribute is ignored). Selecting the two menus makes both of them disappear (i.e., deletion of the hidden attribute doesn't work).
I just checked Mozilla 1.7.8 for Linux, and the bug is still present there too.
Thanks. I have tested the bug with firefox 1.5 beta 1, and the "hidden" misbehavior is fixed. However, like you, I see two menus initially, which would indicate another bug I suppose.
Basically this is one of the bugs like 212625 that were fixed by bug 282359. The initial menus bug is caused by the missing css confusing the load group?
OK, I'm going to mark this worksforme. I've filed bug 310319 on the fact that onload doesn't fire for this testcase when loaded from file://