|
|
Re: "click" discrepancy in DOM L3 and SVG 1.2: msg#00064
web.svg
|
Subject: |
Re: "click" discrepancy in DOM L3 and SVG 1.2 |
Thanks for noticing this. My opinion is that the SVG 1.2 specs (Tiny and
Full) should adopt the DOM L3 wording either by reference or copy/paste.
Jon Ferraiolo
Adobe Systems, Inc.
Member SVG WG
At 11:13 AM 2/14/2005, Jeff Rafter wrote:
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
|
|