W3C home > Mailing lists > Public > www-svg@w3.org > February 2005

"click" discrepancy in DOM L3 and SVG 1.2

From: Jeff Rafter <lists@jeffrafter.com>
Date: Mon, 14 Feb 2005 11:13:56 -0800
Message-ID: <4210F874.2030303@jeffrafter.com>
To: www-svg@w3.org

In SVG 1.2 "click" is described as:

"Occurs when the pointing device button is clicked over an element. A 
click is defined as a mousedown and mouseup over the same screen 
location. The sequence of these events is: mousedown, mouseup, click. If 
multiple clicks occur at the same screen location, the sequence repeats 
with the detail attribute incrementing with each repetition." [1]

However, in DOM L3 it is described as:

"A pointing device button is clicked over an element. The definition of 
a click depends on the environment configuration; i.e. may depend on the 
screen location or the delay between the press and release of the 
pointing device button. In any case, the target node must be the same 
between the mousedown, mouseup, and click. The sequence of these events 
is: [mousedown], [mouseup], and [click]. Note that, given the definition 
of a click, If one or more of the event types [mouseover], [mousemove], 
and [mouseout] occur between the press and release of the pointing 
device button, the event type [click] cannot occur. In the case of 
nested elements, this event type is always targeted at the most deeply 
nested element." [2, namespaces shortened for readability]

The important differences here are that the mousedown, mouseup must be 
on the same node (which is new in DOM L3), and that the sequence cannot 
be interrupted with additional events. Neither Batik nor ASV6 adhere to 
these constraints. It appears that both limit the "screen location" to a 
4x4 pixel area, but ASV6 allows multiple intermediate mousemove events, 
and either allows you to mousedown on one node and mouseup on another-- 
still producing a "click".

[1] http://www.w3.org/TR/SVG12/eventlist.html
[2] http://www.w3.org/TR/DOM-Level-3-Events/events.html#event-click

Thanks for any clarification,
Jeff Rafter
Received on Monday, 14 February 2005 19:14:26 UTC

This archive was generated by hypermail 2.3.1 : Wednesday, 8 March 2017 09:47:02 UTC