Re: onClick handlers vs DOMActivate

On Tue, 2002-04-16 at 14:53, Brad Pettit wrote:
> 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>)

Hitting enter on a focused element would trigger both the DOMActivate
and Click event.

Philippe

Received on Friday, 31 May 2002 14:42:10 UTC