Closed
Bug 260487
Opened 20 years ago
Closed 19 years ago
spinbuttons does not handle this object correctly; inheritence problem.
Categories
(Core :: XUL, defect)
Core
XUL
Tracking
()
RESOLVED
FIXED
People
(Reporter: goodwill.mozilla.bugzilla, Assigned: jag+mozilla)
References
Details
User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.2; en-US; rv:1.7.3) Gecko/20040917 Firefox/0.10
Build Identifier: Mozilla/5.0 (Windows; U; Windows NT 5.2; en-US; rv:1.7.3) Gecko/20040917 Firefox/0.10
Inheritence is not propagated right on the spinnbuttons widget (both in spfe and
in widgets). The "this" object should be returning spinbutton object/element
when execute from onup, ondown methods. Instead it returns the internal
xul:image that contains the images for up button, down button. In addition the
xul:image should probably be anonymous (now they are named upButton and
downButton respectively)
Reproducible: Always
Steps to Reproduce:
1. create foo.xul document, with a <window><hbox> tags and add stylesheet ref to
chrome://communicator/skin/
2. inside <hbox> add <spinbuttons id="foo" onup="alert(this.id)"
ondown="alert(this.id)"/>
3. open foo.xul and clin on the image representing up and down spin buttons.
Actual Results:
the alert message returns: "upButton" when "onup" executes, and "downButton"
when clicked "ondown" executes.
Expected Results:
return the id of the spinbutton, that is "foo". In fact the this object should
also be returning the spinnbutton element with its properties and attributes and
etc.
Reporter | ||
Comment 1•20 years ago
|
||
glazou said he will to r= this.
Reporter | ||
Comment 2•20 years ago
|
||
Comment 3•20 years ago
|
||
Confirming. The problem is that the "onup" is implemented as an event handler on
the underlying image (inherited). It should be implemented via the onclick
handler on the spinbutton itself (which will check the event target, etc).
Status: UNCONFIRMED → NEW
Ever confirmed: true
Comment 4•20 years ago
|
||
As an alternative, would <spinbuttons id="foo" onclick="alert(this.id + '
clicked ' + event.target.className);"/> be any use?
Reporter | ||
Comment 5•20 years ago
|
||
(In reply to comment #4)
> As an alternative, would <spinbuttons id="foo" onclick="alert(this.id + '
> clicked ' + event.target.className);"/> be any use?
Yeah its possible to have to work around, which is how I did it.
Reporter | ||
Comment 6•20 years ago
|
||
not clear which methods and properties spinbuttons should have. so I hesitate to
write a patch.
Comment 7•20 years ago
|
||
I'm going ask for 1.1 blocking on a couple of spinbutton bugs. We have been
trying to use them in our ForcastFox extension, but they won't theme correctly
since we have to supply our own images.
Flags: blocking-aviary1.1?
Updated•20 years ago
|
Flags: blocking-aviary1.1? → blocking-aviary1.1-
Comment 8•19 years ago
|
||
This was fixed by bug 155053
Status: NEW → RESOLVED
Closed: 19 years ago
Resolution: --- → FIXED
You need to log in
before you can comment on or make changes to this bug.
Description
•