Skip to content

Commit 98876f0

Browse files
committed
ensure transition end detection only count events triggered on target element (fix #3506)
1 parent 4d640ce commit 98876f0

File tree

1 file changed

+5
-3
lines changed

1 file changed

+5
-3
lines changed

src/platforms/web/runtime/transition-util.js

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -60,9 +60,11 @@ export function whenTransitionEnds (
6060
el.removeEventListener(event, onEnd)
6161
cb()
6262
}
63-
const onEnd = () => {
64-
if (++ended >= propCount) {
65-
end()
63+
const onEnd = e => {
64+
if (e.target === el) {
65+
if (++ended >= propCount) {
66+
end()
67+
}
6668
}
6769
}
6870
setTimeout(() => {

0 commit comments

Comments
 (0)