Open
Bug 301538
Opened 20 years ago
Updated 3 years ago
cannot dispatch "command" event (event data stored as code)
Categories
(Core :: DOM: Events, defect, P5)
Tracking
()
UNCONFIRMED
People
(Reporter: surkov, Unassigned)
Details
(Whiteboard: DUPEME)
User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.0; ru-RU; rv:1.7.8) Gecko/20050511 Firefox/1.0.4 (ax)
Build Identifier: Mozilla/5.0 (Windows; U; Windows NT 5.0; ru-RU; rv:1.7.8) Gecko/20050511 Firefox/1.0.4 (ax)
'Command' event is MouseEvents. I handle 'command' event from button, I create
'command' event and dispatch it to button. Second event is not handled.
<button label="events" oncommand="post(event)"/>
<script>
function post(event){
var evnt=document.createEvent("MouseEvents");
evnt.initMouseEvent(
event.type, event.cancelBubble, event.cancelable,
event.view, event.detail,
event.screenX, event.screenY, event.clientX, event.clientY,
event.ctrlKey, event.altKey, event.shiftKey, event.metaKey, event.button,
event.relatedTarget);
event.target.dispatchEvent(evnt);
}
</script>
In instance if I work with 'click' event then second events is handled. As
opposed to it the specs say
(http://www.w3.org/TR/DOM-Level-3-Events/events.html#Events-EventTarget-dispatchEvent)
if event doesn't support CustomEvent interface then it cannot be dispatched.
What behaviour should be presented?
Reproducible: Always
![]() |
||
Comment 1•20 years ago
|
||
Usual issue -- SetEventType and GetEventName are not inverses of each other -- SetEventType maps "oncommand" to NS_USER_DEFINED_EVENT, not NS_XUL_COMMAND. We have existing bugs on this...
Whiteboard: DUPEME
![]() |
||
Updated•20 years ago
|
Summary: cannot dispatch "command" event → cannot dispatch "command" event (event data stored as code)
Updated•16 years ago
|
Assignee: events → nobody
QA Contact: ian → events
Comment 2•12 years ago
|
||
Command events can be dispatched from javascript now. Time to close this one.
Comment 3•7 years ago
|
||
https://bugzilla.mozilla.org/show_bug.cgi?id=1472046
Move all DOM bugs that haven’t been updated in more than 3 years and has no one currently assigned to P5.
If you have questions, please contact :mdaly.
Priority: -- → P5
Updated•3 years ago
|
Severity: normal → S3
You need to log in
before you can comment on or make changes to this bug.
Description
•