Weird behavior of webkit-prefixed transition/animation events wrt case
Categories
(Core :: DOM: Events, defect)
Tracking
()
People
(Reporter: bzbarsky, Assigned: bzbarsky)
Details
Consider this testcase:
<script>
var el = document.createElement("div");
el.addEventListener("webkitAnimationEnd", () => console.log("cased"));
el.addEventListener("webkitanimationend", () => console.log("lowercase"));
el.dispatchEvent(new AnimationEvent("webkitAnimationEnd"));
</script>
In Firefox, that logs both "cased"
and "lowercase"
to the console. In Chrome and Safari it just logs "cased"
. The same happens for webkitAnimationIteration
, webkitAnimationStart
, webkitTransitionEnd
.
I expect that's because https://searchfox.org/mozilla-central/rev/ba4fab1cc2f1c9c4e07cdb71542b8d441707c577/dom/events/EventNameList.h#519-537 map two different names to the same event type, and the dispatch is done by event type.
What I am not quite sure about is why we need these all-lowercase bits guarded on MESSAGE_TO_EVENT at all. Can't we just define the properly-cased versions and use [BinaryName] to map the all-lowercase IDL bits to the correct-cased getters/setters?
![]() |
Assignee | |
Comment 1•5 years ago
|
||
This was mentioned near the end of https://groups.google.com/a/chromium.org/d/msg/blink-dev/4Fidt4JqkTk/MNJiPs8cCQAJ
![]() |
Assignee | |
Updated•5 years ago
|
Hey Boris; thanks for filing this, but I think it is a dupe of https://bugzilla.mozilla.org/show_bug.cgi?id=1607918 :)
![]() |
Assignee | |
Comment 3•5 years ago
|
||
Indeed. Hadn't done the search and didn't know a bug was already filed. ;)
Description
•