onClick handlers vs DOMActivate

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 UTC