Closed Bug 8502 Opened 25 years ago Closed 25 years ago

Selecting menuitems from popup menus crashes apprunner.

Categories

(Core :: XUL, defect, P3)

Other
Windows 95
defect

Tracking

()

RESOLVED FIXED

People

(Reporter: bugs, Assigned: hyatt)

References

Details

(Keywords: crash)

I've created popup menus spawned by titledbuttons, similar to the Translate button. The menus are just the standard apprunner menus, but put inside <popup> tags, so the event handlers of the standard menus remain unchanged. Selecting any item from the popup menu causes the apprunner to crash. For instance Edit->Preferences crashes, whereas it did not when it was a "standard" menu. What's more, the apprunner crashes on startup when the onclick handlers of the popupmenu items have any actual JavaScript code in them (as opposed to a function call). (e.g. window.frames[0].frames[1].location.href... - as used by the Help and Debug menus). I created a LoadURL function in navigator.js that performs this operation (so as to have a function call rather than code), but this suffers the same crashing as the other items when selected. Here's a sample popup menu: <popup id="goMenu"> <menu> <menuitem id="menuitem-back" name="&goBackCmd.label;" onclick="BrowserBack();"/> <menuitem id="menuitem-forward" name="&goForwardCmd.label;" onclick="BrowserForward();" /> <menuitem name="&goHomeCmd.label;" onclick="BrowserHome();"/> <separator /> <menuitem name="&goPrev1Cmd.label;" onclick="BrowserBack();"/> <menuitem name="&goPrev2Cmd.label;" onclick="BrowserBack();"/> <menuitem name="&goPrevnCmd.label;" onclick="BrowserBack();"/> </menu> </popup> spawned by a titledbutton: <titledbutton popup="goMenu" popupanchor="bottomleft" value="&goMenu.label;" /> The event handlers above call the standard ones in navigator.js -- i have not modified them. Here's my LoadURL function (as located in navigator.js): function LoadURL(url) { window.frames[0].frames[1].location.href = url; } called by: <menuitem name="foo" onclick="LoadURL('http://foo.com');"/> all my XUL, CSS and JS is online: http://homepages.ihug.co.nz/~rgoodger/navigator.xul http://homepages.ihug.co.nz/~rgoodger/navigator.css http://homepages.ihug.co.nz/~rgoodger/navigator.js
Status: NEW → ASSIGNED
Target Milestone: M8
I tried adding your "back" popup menu item to the translate button. It worked just fine. It did not crash. Are you still seeing this problem? I am wondering if it has been fixed.
Most of the menu items now work as expected, however edit>prefs is still crashing the browser for some reason. I havent changed the call to DoPreferences (), and even tried substituting a newer navigator.js. Maybe there is something in the nature of the DoPreferences function that doesnt appreciate being called from a popup?
Target Milestone: M8 → M9
Moving to M9.
Moving to M10.
Blocks: 12670
Status: ASSIGNED → RESOLVED
Closed: 25 years ago
Resolution: --- → FIXED
resolving as fixed
QA Contact: ckritzer → rgoodger
Assigning to originator per new organizational structure.
QA Contact: rgoodger → ckritzer
Changing QA Contact back to ckritzer@netscape.com
BULK MOVE: Changing component from XUL to XP Toolkit/Widgets: XUL. XUL component will be deleted.
Component: XUL → XP Toolkit/Widgets: XUL
Massive QA Contact update.
QA Contact: ckritzer → jrgm
Adding crash keyword
Keywords: crash
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.