You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
And whenever I try swiping on the content of custom-element-2, these swipes are ignored and no touchStart/touchMove/touchEnd events are triggered on swiper side.
I've investigated this issue, and found that the root cause is in this check in event handlers:
In this case the event target is the nested custom-element-2, and the current implementation of elementIsChildOf returns false when checking if it's a child of the wrapper. So, the event is ignored and no swiping happens.
P.S.: Unfortunately, setting all of this up in codesandbox would take a significant amount of time, so hopefully my examples are clear enough.
Check that this is really a bug
Reproduction link
—
Bug description
I'm using a setup with nested web components as slides, here's a simplified example:
And the
custom-swiper
component looks something like this:And whenever I try swiping on the content of
custom-element-2
, these swipes are ignored and no touchStart/touchMove/touchEnd events are triggered on swiper side.I've investigated this issue, and found that the root cause is in this check in event handlers:
In this case the event target is the nested
custom-element-2
, and the current implementation of elementIsChildOf returns false when checking if it's a child of the wrapper. So, the event is ignored and no swiping happens.P.S.: Unfortunately, setting all of this up in codesandbox would take a significant amount of time, so hopefully my examples are clear enough.
Expected Behavior
No response
Actual Behavior
No response
Swiper version
11.1.14
Platform/Target and Browser Versions
All modern browsers
Validations
Would you like to open a PR for this bug?
The text was updated successfully, but these errors were encountered: