Opened 9 years ago
Closed 9 years ago
#16543 closed defect (fixed)
lastEvent comparison broken
Reported by: | bill | Owned by: | bill |
---|---|---|---|
Priority: | undecided | Milestone: | 1.9 |
Component: | Events | Version: | 1.8.2 |
Keywords: | Cc: | ||
Blocked By: | Blocking: |
Description (last modified by )
Split from #15097. In 1.8 there's a bug on IE in this situation:
<div id="div">click me</div> <button id="button">synthetically clicked</button> <script> on(dom.byId("div"), "click", function(evt){ evt.preventDefault(); evt.stopPropagation(); dom.byId("button").click(); }); </script>
When the user clicks the <div>, the div.click listener modifies the original evt (by calling stopPropagation), and then creates a new click event on the <button>. Although the new (synthetic) click is a new event, since the two events arrive nearly simultaneously, and have the same type, the on._fixEvent processing assumes they are the same event. I.E. lastEvent matches the new event.
My [30051] tried to fix this, but broke dojo/tests/on/on (for IE). On IE, evt.target (for native events) is not defined, so I should have been checking for evt.srcElement.
Change History (2)
comment:1 Changed 9 years ago by
Description: | modified (diff) |
---|---|
Milestone: | tbd → 1.9 |
Owner: | changed from Kris Zyp to bill |
Status: | new → assigned |
comment:2 Changed 9 years ago by
Resolution: | → fixed |
---|---|
Status: | assigned → closed |
In [30281]: