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

Re: onClick handlers vs DOMActivate

From: Philippe Le Hegaret <plh@w3.org>
Date: 31 May 2002 14:41:25 -0400
To: Brad Pettit <bradp@microsoft.com>
Cc: www-dom@w3.org
Message-Id: <1022870485.23994.75.camel@jfouffa>

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 GMT

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