Open Bug 381518 Opened 18 years ago Updated 3 years ago

setAttribute oncommand fails

Categories

(Core :: XUL, defect)

1.8 Branch
x86
Windows XP
defect

Tracking

()

People

(Reporter: mgalli, Unassigned)

References

Details

Attachments

(1 file)

605 bytes, application/vnd.mozilla.xul+xml
Details
I searched and was not able to find the actual origin bug. Please needed. Basically if JS sets oncommand to a menuitem, toolbarbutton, the oncommand attribute gets a new vlaue, but the actual action remains the previous. Online forums I see comments about this from 2005. Please help finding the current resolution in bugzilla..
Attached file XUL testcase.
TEstcase tries to set the oncommand.
Moved to toolkit. The DOM part of it works as you can see a new attribute value in the field. Is the function part of it that fails.
Assignee: general → nobody
Component: DOM → XP Toolkit/Widgets: XUL
QA Contact: ian → xptoolkit.xul
Confirming. (I'm pretty sure the bug is somewhere in nsXULElement.cpp.)
Status: UNCONFIRMED → NEW
Ever confirmed: true
I ran into this bug a while back and was able to get around it by removing the oncommand attribute before changing the value. So instead of just using setAttribute('oncommand','doThis()'); I used the following: element.removeAttribute('oncommand'); element.setAttribute('oncommand','newFunction()');
Bug 356697 is a duplicate of this bug
Component: XP Toolkit/Widgets: XUL → XUL
QA Contact: xptoolkit.xul → xptoolkit.widgets
Confirmed bug with 1.9.0 and 1.9.1b3pre (both Linux)
Severity: normal → S3
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: