W3C home > Mailing lists > Public > www-dom@w3.org > January to March 2010

Re: [D3E] Comments

From: Olli Pettay <Olli.Pettay@helsinki.fi>
Date: Mon, 01 Feb 2010 02:03:14 +0200
Message-ID: <4B661A42.2090800@helsinki.fi>
To: Sean Hogan <shogun70@westnet.com.au>
CC: "www-dom@w3.org" <www-dom@w3.org>
On 2/1/10 1:48 AM, Sean Hogan wrote:
>> mouseenter and mouseleave
>> - They still need to be defined more precisely.
>
> I think they are supposed to match IE behavior.
IE doesn't have capturing phase.
And I wonder if the current draft actually matches IE
behavior even in bubble phase - which is why I
asked the events to be defined more precisely.

>
>> When mouse is moved for body element to
>> <h1><h2><h3>foobar</h3></h2></h1> will there be
>> 3 mouseenter events dispatched?
>
> That isn't valid HTML. But assuming that it is...
That isn't relevant. No one cares :)

>
> It depends. If the mouse move directly to h3 - without moving over h1 or
> h2 - then there will be only one event.
Why?
The draft says "A user agent must dispatch this event when a pointing 
device is moved onto the boundaries of an element or one of its 
descendent elements."
h3 is a descendant of h1 and h2. Why shouldn't h1 and h2 get an event 
(well, they do get the event targeted to h3 during capturing phase, but
  that is different thing)

> However, the :hover state for an element is not always preceded by a
> mouseenter event on the element.
> Referring back to the previous example <h1><h2><h3>foobar</h3></h2></h1>
> (which isn't valid, but assuming that it is):
> Say h3 is positioned absolutely, so that the mouse could move to it
> without moving over h1 or h2.
> There would be a mouseenter event on h3, but not on h1 or h2.
> Yet all of h3, h1 and h2 would be in the :hover state.
Ah, so that is the way IE works? Then the draft is clearly wrong (if we 
want to match IE's behavior.) The problem is how to define that behavior
in D3E without relying on CSS drafts/specs too much.


-olli
Received on Monday, 1 February 2010 00:03:51 GMT

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