[Webkit-unassigned] [Bug 216681] iOS: Change events are fired on incorrect elements if a dblclick listener is registered on a parent

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Fri Sep 18 07:47:39 PDT 2020


https://bugs.webkit.org/show_bug.cgi?id=216681

Dan Abramov <dan.abramov at me.com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |dan.abramov at me.com

--- Comment #1 from Dan Abramov <dan.abramov at me.com> ---
I want to add that this doesn't only affect the "change" event, but the "click" event itself.

The issue itself also seems scoped to interactive elements like buttons and checkboxes, but does NOT occur for divs with onclick listeners.

Here's a few different repro cases to compare.


## Working Case (Divs)

https://codesandbox.io/s/falling-shape-fjptk?file=/src/index.js (live demo: https://fjptk.csb.app/)

Click A twice.
Expected and actual: click(A), click(A), and dblclick(A). (All good!)

Quickly tap A and then B.
Expected and actual: click(A), click(B). (All good — no double click because target has changed!)

## Broken Case (Checkboxes)

https://codesandbox.io/s/recursing-glade-ysxv2 (live demo: https://ysxv2.csb.app/)

Click A twice.
Expected and actual: click(A), click(A), and dblclick(A). (All good!)

Quickly tap A and then B.
Expected: click(A), click(B).
ACTUAL (broken): click(A), click(A), dblclick(A).

As you can see, here switching from A to B still keeps dispatching events on A, even though the target has changed.

Buttons are broken in the same way as checkboxes.

-- 
You are receiving this mail because:
You are the assignee for the bug.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.webkit.org/pipermail/webkit-unassigned/attachments/20200918/dd8029e1/attachment.htm>


More information about the webkit-unassigned mailing list