From 8df7edffb8a30250298f5b5978f5b833f08ee4f4 Mon Sep 17 00:00:00 2001 From: Vladimir Kharlampidi Date: Thu, 4 Aug 2022 12:34:17 +0300 Subject: [PATCH] fix: event.path => event.composedPath fixes #5925 --- src/core/events/onTouchStart.js | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/src/core/events/onTouchStart.js b/src/core/events/onTouchStart.js index 2a3760725..26d76f424 100644 --- a/src/core/events/onTouchStart.js +++ b/src/core/events/onTouchStart.js @@ -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]); }