Closed Bug 73804 Opened 23 years ago Closed 23 years ago

JavaScript error, after selecting a submenu item in context menu.

Categories

(SeaMonkey :: UI Design, defect)

x86
Windows NT
defect
Not set
normal

Tracking

(Not tracked)

RESOLVED FIXED
Future

People

(Reporter: nhottanscp, Assigned: bugzilla)

References

Details

Attachments

(1 file)

I am getting a following error when I select a sub menu item in context menu.
"JavaScript error: line 0: contextMenu has no properties"

Selecting non submenu item like "test2" does not cause the error but the submenu 
item like "test11" always causes the JS error.

  <popupset id="contentAreaContextSet">
    <popup id="contentAreaContextMenu">
      <menu label="test1">
       <menupopup>
          <menuitem label="test11" />
       </menupopup>
       </menu>
      <menuitem label="test2" />
      <menuseparator />
    </popup>
  </popupset>
Blocks: 70830
there could be some problem with /xpfe/communicator/resources/content/
contentAreaContextOverlay.xul, since that's the only thing I can see that 
references |contextMenu|.

editor has submenus in context menus, and i see no js errors there.

-->blake
Assignee: pinkerton → blakeross
Component: XP Toolkit/Widgets: Menus → XP Apps
Do you still see this?
Naoki, are you still able to reproduce this?
Yes, I see it with the patch in bug 70830.
http://bugzilla.mozilla.org/showattachment.cgi?attach_id=28959
I tracked this down to the onDestroy method of the nsContextMenu function 
prototype (class):

http://lxr.mozilla.org/seamonkey/source/xpfe/communicator/resources/content/nsCo
ntextMenu.js#57

I will attempt to resolve this today, if blake or any other of the original 
authors had a look, it would be greatly appreciated.
Status: NEW → ASSIGNED
Target Milestone: --- → Future
Attached patch workaroundSplinter Review
The real fix is for onpopuphiding and onpopupshowing to not bubble, but this 
will suffice for now. Fixed.
Status: ASSIGNED → RESOLVED
Closed: 23 years ago
Resolution: --- → FIXED
Blake, there's a stray ' character inserted in that patch (one of the hunks near
the end).

Also, could you split out the disabled="true" attribute to a separate line to
help preserve the beautifully arranged xul :-).
Product: Core → Mozilla Application Suite
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Creator:
Created:
Updated:
Size: