Open Bug 323005 Opened 19 years ago Updated 2 years ago

button should fire DOMActivate event

Categories

(Toolkit :: UI Widgets, defect)

x86
Windows 2000
defect

Tracking

()

People

(Reporter: surkov, Unassigned)

References

Details

Attachments

(1 file)

1.38 KB, application/vnd.mozilla.xul+xml
Details
User-Agent:       Mozilla/5.0 (Windows; U; Windows NT 5.0; en-US; rv:1.9a1) Gecko/20051212 Firefox/1.6a1
Build Identifier: Mozilla/5.0 (Windows; U; Windows NT 5.0; en-US; rv:1.9a1) Gecko/20051212 Firefox/1.6a1

XUL Element 'button' doesn't fire 'DOMActivate' event when button is activated.

Reproducible: Always
Attached file test case
Blocks: 323006
Well, the 'DOMActivate' event seems to only work for html form controls and html links.
It seems to me, it should work on all elements. I tend to think DOMActivate is the dom equivalent of :active in css.

From:
http://www.w3.org/TR/DOM-Level-2-Events/events.html#Events-eventgroupings-uievents-h3
"
DOMActivate
The activate event occurs when an element is activated, for instance, thru a mouse click or a keypress. A numerical argument is provided to give an indication of the type of activation that occurs: 1 for a simple activation (e.g. a simple click or Enter), 2 for hyperactivation (for instance a double click or Shift Enter).

        * Bubbles: Yes
        * Cancelable: Yes
        * Context Info: detail (the numerical value)
"

In Mozilla, only a mouseclick on an element triggers DOMActivate or (css :active), so the workaround would be just to use the click event, since it's doing the same.
Status: UNCONFIRMED → NEW
Ever confirmed: true
So I'm thinking about this one, and I'm wondering just which XUL elements (besides <xul:button/>) this should apply to.  From a quick look at LXR, it seems no XUL elements currently fire DOMActivate.

This is important in that there are to my knowledge no specific XUL elements defined in C++ code - most of them are from bindings.

Also, please don't restrict the definition of elements-this-should-be-fired-by to just XUL elements in our current toolkit; otherwise external XUL bindings won't pick up the fix.

Per my read of DOMActivate in DOM 2 Events & DOM 3 Events, it might be best to fix the bug in nsXULElement::Click().
Blocks: 339312
For XUL, I think DOMActivate could probably just be the equivalent of the command event, so it may be easier just to map both to the same thing.
(In reply to comment #4)
> For XUL, I think DOMActivate could probably just be the equivalent of the
> command event, so it may be easier just to map both to the same thing.
> 

I guess too, at least in xforms 'command' event is handled on button and 'DOMActivate' event is fired.
Severity: normal → S3
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: