Skip to content

Commit

Permalink
fixes issue where DOM element is detached
Browse files Browse the repository at this point in the history
Pointer capture, at least the pollyfill will continue to send the events to the detached element.
  • Loading branch information
stakach committed Nov 30, 2014
1 parent c917729 commit b2ed26e
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions ngGesture/gesture.js
Original file line number Diff line number Diff line change
Expand Up @@ -438,6 +438,12 @@
}

instances = []; // reset instances var

// Check the element is in the DOM
if (!jQuery.contains(document.documentElement, element[0])) {
element[0].releasePointerCapture(event.pointerId);
return; // nothing more we can do
}
}


Expand Down

0 comments on commit b2ed26e

Please sign in to comment.