Skip to content

Commit

Permalink
fix: event.path => event.composedPath
Browse files Browse the repository at this point in the history
fixes #5925
  • Loading branch information
nolimits4web committed Aug 4, 2022
1 parent ae429c4 commit 8df7edf
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion src/core/events/onTouchStart.js
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,13 @@ export default function onTouchStart(event) {

// change target el for shadow root component
const swipingClassHasValue = !!params.noSwipingClass && params.noSwipingClass !== '';
if (swipingClassHasValue && e.target && e.target.shadowRoot && event.path && event.path[0]) {
// eslint-disable-next-line
const eventPath = event.composedPath
? event.composedPath()
: event.path
? event.path[0]
: undefined;
if (swipingClassHasValue && e.target && e.target.shadowRoot && eventPath) {
$targetEl = $(event.path[0]);

This comment has been minimized.

Copy link
@stefanholzapfel

stefanholzapfel Sep 14, 2022

Contributor

This should be eventPath[0] not event.path[0] ?

}

Expand Down

0 comments on commit 8df7edf

Please sign in to comment.