Skip to content

Commit

Permalink
Use event.target in cases where _first target has been removed from DOM
Browse files Browse the repository at this point in the history
  • Loading branch information
sgparrish committed Dec 27, 2023
1 parent d5ec638 commit 4f2214b
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/propagating.js
Original file line number Diff line number Diff line change
Expand Up @@ -196,7 +196,7 @@ export default function propagating(hammer, options) {
event.firstTarget = _firstTarget;

// propagate over all elements (until stopped)
var elem = _firstTarget;
var elem = document.contains(_firstTarget) ? _firstTarget : event.target;
while (elem && !stopped) {
var elemHammer = elem.hammer;
if(elemHammer){
Expand Down

0 comments on commit 4f2214b

Please sign in to comment.