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

Commit

Permalink
Dispatcher: Do not propagate over removed nodes
Browse files Browse the repository at this point in the history
Fixes gh-326
Closes gh-339
  • Loading branch information
bethge committed Apr 13, 2017
1 parent b684991 commit 3448030
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions src/dispatcher.js
Original file line number Diff line number Diff line change
Expand Up @@ -318,6 +318,10 @@ var dispatcher = {
while (target !== document && !target.contains(event.relatedTarget)) {
targets.push(target);
target = target.parentNode;
// Touch: Do not propagate if node is detached.
if (!target) {
return;
}
}
if (propagateDown) {
targets.reverse();
Expand Down

0 comments on commit 3448030

Please sign in to comment.