<button> text does not dispatch click events when its mouseup and mousedown handlers modify its innerHTML
Reported by
ben.p...@openreign.com,
Nov 19 2016
|
||||||
Issue descriptionUserAgent: Mozilla/5.0 (Windows NT 10.0; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/54.0.2840.99 Safari/537.36 Steps to reproduce the problem: 1. Open the attached file or go to https://jsfiddle.net/p09cy693/1/ 2. Click the button element several times in different place (ie. the center, the edge. 3. What is the expected behavior? First, the mousedown, mouseup, and click events fire in that order. What went wrong? Depending on where you click the button element, the click event doe not fire. It seems especially likely not to fire if the button is clicked near the edge. This only happens if the mouseup and mousedown events are listened to. Did this work before? N/A Does this work in other browsers? Yes Chrome version: 54.0.2840.99 Channel: stable OS Version: 10.0 Flash Version: Shockwave Flash 23.0 r0
,
Nov 19 2016
,
Nov 19 2016
,
Nov 21 2016
Probably an EventHandler.cpp bug.
,
Nov 21 2016
,
Nov 21 2016
The bug does not have anything to do with innerHTML, specifically. It happens when using appendChild as well. I ran a bunch of tests and there seem to be two consistent factors. 1. The contents on the button is changed in the mouseup event. 2. The new button contents contain at least two nodes Here's a new example. https://jsfiddle.net/p09cy693/3/ The second and third buttons exhibit this behavior. If you click on the button padding, the click event fires. But if you click on the text in the button, the click event does not fire.
,
Mar 23 2017
nzolghadr@ can you look into this I presume it is something funky going on with the target of the event being replaced and so the event doesn't dispatch to the tree anymore?
,
Oct 9
This bug has been fixed. It's most likely still open, because it was incorrectly summarized. |
||||||
►
Sign in to add a comment |
||||||
Comment 1 by ben.p...@openreign.com
, Nov 19 2016