Skip to content
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

[BUG] Swiperjs within pane #209

Closed
ShoppasGit opened this issue Jul 23, 2023 · 2 comments
Closed

[BUG] Swiperjs within pane #209

ShoppasGit opened this issue Jul 23, 2023 · 2 comments
Assignees
Labels
bug Something isn't working

Comments

@ShoppasGit
Copy link

Describe the bug
When I place a swiperjs component in a cupertino pane and I swipe horizontally to change slides I get the following error. Iv tried stoping propagation from the swiper to the pane but with no luck. The cupertino pane still functions vertically as expected just with alot of the same error.

ERROR TypeError: Cannot read properties of undefined (reading 'clientY')
at Events.getEventClientYX (cupertino-pane.esm.min.js:13:13875)
at Events.touchMove (cupertino-pane.esm.min.js:13:6647)
at Events.touchMoveCb (cupertino-pane.esm.min.js:13:3358)
at _ZoneDelegate.invokeTask (zone.js:402:31)
at core.mjs:25881:55
at AsyncStackTaggingZoneSpec.onInvokeTask (core.mjs:25881:36)
at _ZoneDelegate.invokeTask (zone.js:401:60)
at Object.onInvokeTask (core.mjs:26182:33)
at _ZoneDelegate.invokeTask (zone.js:401:60)
at Zone.runTask (zone.js:171:47)

To Reproduce
Place swiperjs component within cupertino pane.

Expected behavior
Someway for me to stop the listeners maybe?

@roman-rr roman-rr self-assigned this Jul 24, 2023
@roman-rr roman-rr added the bug Something isn't working label Jul 24, 2023
@roman-rr
Copy link
Collaborator

roman-rr commented Jul 24, 2023

@ShoppasGit Try to add events-prefix="swiper-" to your swiperjs configuration.

<swiper-container events-prefix="swiper-">
            <swiper-slide>Slide 1</swiper-slide>
            <swiper-slide>Slide 2</swiper-slide>
            <swiper-slide>Slide 3</swiper-slide>
</swiper-container>

This is happens because swiper manually propogate same event names and panes listening its.

@ShoppasGit
Copy link
Author

Man you're good!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants