Closed
Bug 8502
Opened 25 years ago
Closed 25 years ago
Selecting menuitems from popup menus crashes apprunner.
Categories
(Core :: XUL, defect, P3)
Tracking
()
RESOLVED
FIXED
M10
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
Assignee | ||
Updated•25 years ago
|
Status: NEW → ASSIGNED
Target Milestone: M8
Assignee | ||
Comment 1•25 years ago
|
||
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.
Reporter | ||
Comment 2•25 years ago
|
||
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?
Assignee | ||
Updated•25 years ago
|
Target Milestone: M8 → M9
Assignee | ||
Comment 3•25 years ago
|
||
Moving to M9.
Assignee | ||
Comment 4•25 years ago
|
||
Moving to M10.
Updated•25 years ago
|
Status: ASSIGNED → RESOLVED
Closed: 25 years ago
Resolution: --- → FIXED
Comment 5•25 years ago
|
||
resolving as fixed
Updated•25 years ago
|
QA Contact: ckritzer → rgoodger
Comment 6•25 years ago
|
||
Assigning to originator per new organizational structure.
Updated•25 years ago
|
QA Contact: rgoodger → ckritzer
Comment 7•25 years ago
|
||
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
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.
Description
•