Skip to content

Commit

Permalink
Additionally check if a touch originated within the shadowRoot (leong…
Browse files Browse the repository at this point in the history
  • Loading branch information
Shackless authored Mar 27, 2020
1 parent d941520 commit 63b84ce
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/nouislider.js
Original file line number Diff line number Diff line change
Expand Up @@ -1519,7 +1519,7 @@
if (touch) {
// Returns true if a touch originated on the target.
var isTouchOnTarget = function(checkTouch) {
return checkTouch.target === eventTarget || eventTarget.contains(checkTouch.target);
return checkTouch.target === eventTarget || eventTarget.contains(checkTouch.target) || (checkTouch.target.shadowRoot && checkTouch.target.shadowRoot.contains(eventTarget));
};

// In the case of touchstart events, we need to make sure there is still no more than one
Expand Down

0 comments on commit 63b84ce

Please sign in to comment.