W3C home > Mailing lists > Public > www-dom@w3.org > April to June 2002

onClick handlers vs DOMActivate

From: Brad Pettit <bradp@microsoft.com>
Date: Tue, 16 Apr 2002 11:53:37 -0700
Message-ID: <3013537455C0D1459746B2AE2DF47AEA0521F184@svc-msg-01.northamerica.corp.microsoft.com>
To: <www-dom@w3.org>
With DOM0 events, a UA would fire/bubble an onClick handler when responding to a press of the return key on a focused element. Since DOM2 defines the DOMActivate UI event as well as the click MouseEvent, should both events be fired? A related situation is with DOM methods that cause invocation of event handlers, such as calling button.click() on an INPUT element. Should that cause click MouseEvent listeners to be called?

I have a suggestion for resolving this: no DOM2 event listener should be invoked as the result of a DOM0 method. For example, a script calling the "click" method of a HTMLButton would NOT result in an event being dispatched to eventListeners registered for MouseEvent events. It could, however, cause the "DOMActivate" event to get called (depending on whether DOMActivate invokes the action or just serves as a means to intercept and prevent the default action. See <http://lists.w3.org/Archives/Public/www-dom/2002AprJun/0026.html>)

Brad Pettit
Microsoft Corporation
Received on Tuesday, 16 April 2002 14:54:13 GMT

This archive was generated by hypermail 2.2.0+W3C-0.50 : Friday, 22 June 2012 06:13:56 GMT