-
-
Notifications
You must be signed in to change notification settings - Fork 9.7k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
No swiping over nested shadow doms #6063
Comments
Same here. Thanks for reporting. |
Same here:
|
Same error. Had to revert to 8.3.2 |
Same error here. Upgrading from a working version of 8.3.2 broke the library |
So the solution is downgrade to 8.2.4?
|
@johnark88 @Allan-Nava I'm not sure we are talking about the same error (even if they might be connected). The reported error looks like it comes from introducing a new helper variable (eventPath) but using it only in the if condition and not in the assignment. So before the change, the variable that get's assigned (event.path[0]) was part of the if condition and therefore not assigned if undefined. But now the helper variable is checked, which might have a value while event.path is nullish. @nolimits4web fyi |
@nolimits4web sorry for bothering, but I think the solution provided was not ideal. In case of a composedPath, you now get an array of elements in your $targetEl. Please check #6065 for a slightly other suggestion. |
Check that this is really a bug
Reproduction link
https://codesandbox.io/s/swiper-default-forked-0viqjr?file=/index.html
Bug description
Since upgrading to the latest version of swiper (8.4.0), swiping throws an error when started over an embedded shadow dom.
I used a simple webcomponent from shoelace to showcase the issue in codesandbox. Just try to swipe when starting over the progress ring webcomponent. Please note that the error is not thrown to the embedded console but to the browsers console:
This behavior is new, until recently I was working with embedded web components without any issues.
I guess it's a typo in 8df7edf line 55.
I added a comment there.
Expected Behavior
Don't throw an error when start swiping over nested shadowDOM
Actual Behavior
No response
Swiper version
8.4.0
Platform/Target and Browser Versions
Ubuntu / Chromium
Validations
Would you like to open a PR for this bug?
The text was updated successfully, but these errors were encountered: