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

Re: onclick after removing element from document during onmouseup [ISSUE-180]

From: Doug Schepers <schepers@w3.org>
Date: Wed, 11 May 2011 17:07:17 -0400
Message-ID: <4DCAFA85.2050008@w3.org>
To: Ryosuke Niwa <rniwa@webkit.org>
CC: www-dom@w3.org, Ojan Vafai <ojan@chromium.org>, Erik Arvidsson <arv@chromium.org>, Glenn Maynard <glenn@zewt.org>
Hi, folks-

We have added wording to the spec that states that if the target element 
is removed from the DOM during the mouse events sequence, the remaining 
events of the sequence must not be fired on that element.  We've also 
added an example, e.g. if the element is removed during the mousedown 
event, no events for that element will be dispatched for mouseup, click, 
dblclick, or default activation events.

Please let us know if this satisfies your issue.


Ryosuke Niwa wrote (on 5/10/11 9:39 PM):
> I talked with my colleagues and we came to a conclusion that WebKit
> should match IE's and FF's behaviors since we couldn't think of a reason
> why either behavior is better.
> I filed a WebKit bug https://bugs.webkit.org/show_bug.cgi?id=60600 to
> track this behavioral change.
> As such, please consider spec'ing this behavior explicitly.
> - Ryosuke
> On Sun, May 8, 2011 at 8:15 PM, Glenn Maynard <glenn@zewt.org
> <mailto:glenn@zewt.org>> wrote:
>     On Sun, May 8, 2011 at 11:12 PM, Ryosuke Niwa <rniwa@webkit.org
>     <mailto:rniwa@webkit.org>> wrote:
>         On Sun, May 8, 2011 at 8:01 PM, Glenn Maynard <glenn@zewt.org
>         <mailto:glenn@zewt.org>> wrote:
>             In all cases matching Firefox, if the node is removed and
>             immediately reinserted at the same position, the behavior is
>             unchanged: onclick doesn't happen.  (In other words, they're
>             remembering that the node was removed, not checking that
>             it's still in the document later.)
>         Is this Internet Explorer's behavior?
>     Yes, IE9 matches FF4.  (I typed that out, but it seems to have
>     escaped from the message.)
>     --
>     Glenn Maynard
Received on Wednesday, 11 May 2011 21:09:21 UTC

This archive was generated by hypermail 2.3.1 : Tuesday, 20 October 2015 10:46:17 UTC