Closed Bug 119779 Opened 23 years ago Closed 20 years ago

Getting Javascript error (uncaught exception) when pressing the dropdown button in the OSCP list

Categories

(Core :: XUL, defect, P2)

x86
Windows 2000
defect

Tracking

()

RESOLVED WORKSFORME

People

(Reporter: bugzilla, Assigned: hyatt)

References

(Blocks 1 open bug)

Details

(Keywords: regression)

In the Prefs -> Privacy & Security -> Validation if I select the 3 option in OSCP and then press the dropdown button and select an item I get: Error: uncaught exception: [Exception... "Component returned failure code: 0x80004005 (NS_ERROR_FAILURE) [nsIMenuBoxObject.activeChild]" nsresult: "0x80004005 (NS_ERROR_FAILURE)" location: "JS frame :: <unknown filename> :: onxblpopupshowing :: line 6" data: no] 20020111
I see that. The xul and js for this dialog to not use nsIMenuBoxObject.activeChild We have a menulist and we call the following methods on it: var CA = signersMenu.getAttribute("value"); signersMenu.firstChild.appendChild(menuItemNode); signersMenu.setAttribute("disabled", true); signersURL.removeAttribute("disabled") I'll place try blocks to see which one of these calls generates the error. I suspect that it's either getAttribute("value") or appendChild() cc Hyatt in case this is a known xul issue.
Keywords: regression
Priority: -- → P2
Target Milestone: --- → 2.2
nsbeta1
Keywords: nsbeta1
Keywords: nsbeta1nsbeta1-
Blocks: 157555
Keywords: nsbeta1
Keywords: nsbeta1-
While the dropdown list has other issues (like being to narrow to read the entries), I can no longer reproduce this reported problem. Resolving worksforme.
Status: NEW → RESOLVED
Closed: 23 years ago
Resolution: --- → WORKSFORME
still getting: Error: uncaught exception: [Exception... "Component returned failure code: 0x80004005 (NS_ERROR_FAILURE) [nsIMenuBoxObject.activeChild]" nsresult: "0x80004005 (NS_ERROR_FAILURE)" location: "JS frame :: <unknown filename> :: onxblpopupshowing :: line 6" data: no] 20020819
Status: RESOLVED → REOPENED
Resolution: WORKSFORME → ---
Ok, you are right. But there is restriction to see this bug. It only happens on first attempt. If you ignore the error and still press ok, then open prefs again, and select another entry from the list, the error does not appear again. I don't think the code that Stephane mentions in comment 1 is causing the problem, because that code is executed when the pane is loaded, but the exception does not appear until you click the dropdown box.
I'm unable to find the cause for this error. Assigning to XUL. Can you please have a look?
Assignee: ssaux → hyatt
Status: REOPENED → NEW
Component: Client Library → XP Toolkit/Widgets: XUL
Product: PSM → Browser
QA Contact: junruh → shrir
Target Milestone: 2.2 → ---
Version: 1.01 → other
I get that same exception on the "From:" dropdown in Composer (Mozilla 1.0 on Red Hat Linux 7.2), and also on the dropdown in a XUL application I'm making (Mozilla 1.1 on a different RH7.2 box).
Sorry to keep spamming the whiteboard, but I played around a bit and found a partial solution. I added these two lines to content/global/bindings/menulist.xml: (starting at line 30) <handler event="popupshowing"> <![CDATA[ +++ try { if (event.target.parentNode == this && this.selectedItem) { // Not ready for auto-setting the active child in hierarchies yet. // For now, only do this when the outermost menupopup opens. var menuBox = this.boxObject.QueryInterface(Components.interfaces.nsIMenuBoxObject); menuBox.activeChild = this.selectedItem; } +++ } catch(e) {} ]]> </handler> </handlers> That prevented the error on my 1.0 Compose window popup. (I haven't tried it on my Moz 1.1 box yet.) There's probably an 'official' (or at least cleaner) way to handle this, but it's a clue as to the cause of the problem. HTH. Again, sorry to keep bugging.
is bug 106964 a dupe of this?
*** Bug 106964 has been marked as a duplicate of this bug. ***
dmose said: that sounds like a XUL bug, ie in XUL itself. you'll need to go read whatever code implements nsIMenuBoxObject
I get the same error using 1.2.1 built on a linux Redhat box (Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.2.1) Gecko/20021208)
Nav triage team: nsbeta1-
Keywords: nsbeta1nsbeta1-
worksforme in 1.7. On my box, there's a separate problem with the drop-down not widening enough and the list items reading like crap, but that's not this bug. - N.
Status: NEW → RESOLVED
Closed: 23 years ago20 years ago
Resolution: --- → WORKSFORME
Component: XP Toolkit/Widgets: XUL → XUL
QA Contact: shrir → xptoolkit.widgets
You need to log in before you can comment on or make changes to this bug.