Explorar o código

ensure transition end detection only count events triggered on target element (fix #3506)

Evan You %!s(int64=9) %!d(string=hai) anos
pai
achega
98876f008b
Modificáronse 1 ficheiros con 5 adicións e 3 borrados
  1. 5 3
      src/platforms/web/runtime/transition-util.js

+ 5 - 3
src/platforms/web/runtime/transition-util.js

@@ -60,9 +60,11 @@ export function whenTransitionEnds (
     el.removeEventListener(event, onEnd)
     cb()
   }
-  const onEnd = () => {
-    if (++ended >= propCount) {
-      end()
+  const onEnd = e => {
+    if (e.target === el) {
+      if (++ended >= propCount) {
+        end()
+      }
     }
   }
   setTimeout(() => {