Skip to content
This repository was archived by the owner on Feb 11, 2021. It is now read-only.

Commit 3448030

Browse files
committed
Dispatcher: Do not propagate over removed nodes
Fixes gh-326 Closes gh-339
1 parent b684991 commit 3448030

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

src/dispatcher.js

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -318,6 +318,10 @@ var dispatcher = {
318318
while (target !== document && !target.contains(event.relatedTarget)) {
319319
targets.push(target);
320320
target = target.parentNode;
321+
// Touch: Do not propagate if node is detached.
322+
if (!target) {
323+
return;
324+
}
321325
}
322326
if (propagateDown) {
323327
targets.reverse();

0 commit comments

Comments
 (0)