Skip to content

Commit

Permalink
fix(onTouchStart.js): Fix target element assignment (#6065)
Browse files Browse the repository at this point in the history
* Update onTouchStart.js

Fix eventPath usage

* Chore(prettify)

Co-authored-by: stefan.holzapfel <[email protected]>
  • Loading branch information
stefanholzapfel and stefan.holzapfel authored Sep 15, 2022
1 parent a4a6c1a commit cb46a9a
Showing 1 changed file with 2 additions and 6 deletions.
8 changes: 2 additions & 6 deletions src/core/events/onTouchStart.js
Original file line number Diff line number Diff line change
Expand Up @@ -46,13 +46,9 @@ export default function onTouchStart(event) {
// change target el for shadow root component
const swipingClassHasValue = !!params.noSwipingClass && params.noSwipingClass !== '';
// eslint-disable-next-line
const eventPath = event.composedPath
? event.composedPath()
: event.path
? event.path[0]
: undefined;
const eventPath = event.composedPath ? event.composedPath() : event.path;
if (swipingClassHasValue && e.target && e.target.shadowRoot && eventPath) {
$targetEl = $(eventPath);
$targetEl = $(eventPath[0]);
}

const noSwipingSelector = params.noSwipingSelector
Expand Down

0 comments on commit cb46a9a

Please sign in to comment.