question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Swiper breaks on iOS10 safari with s.params is not an object (onTouchStart)

See original GitHub issue

This is a (multiple allowed):

  • bug

  • enhancement

  • feature-discussion (RFC)

  • Swiper Version: EXACT RELEASE VERSION OR COMMIT HASH, HERE. 3.4.1

  • Platform/Target and Browser Versions: PLATFORM CLIENT YOU ARE TARGETING SUCH AS macOS, Windows, CORDOVA, IOS, ANDROID, CHROME, ETC. IOS10 Safari

What you did

EXPLAIN WHAT YOU DID, PREFERABLY WITH CODE EXAMPLES, HERE.

TouchStart event shits the bed with (s.params is not an object)

Expected Behavior

EXPLAIN WHAT IS TO BE EXPECTED, HERE.

Not to shit the bed.

Actual Behavior

EXPLAIN WHAT IS ACTUALLY HAPPENING, HERE.

swiper.js line 1533 defines
s.onTouchStart = function (e) { ... } the first touch event on iOS safari, s is null, so line 1538 throws an error. if (s.params.noSwiping && findElementInEvent(e, '.' + s.params.noSwipingClass)) { ... }

if I modify the onTouchStart handler as such, it doesn’t break - but not sure what the impact is. s.onTouchStart = function (e) { if (!s) return; ... }

The touchStart event appears to fire twice (at least on the first touch) first time s === null second time s === swiper instance.

P.S. Remember, an issue is not the place to ask questions. You can use Stack Overflow for that.

Before you open an issue, please check if a similar issue already exists or has been closed before.

Issue Analytics

  • State:closed
  • Created 7 years ago
  • Reactions:2
  • Comments:9 (7 by maintainers)

github_iconTop GitHub Comments

1reaction
sconixcommented, Apr 14, 2017

The ngx-swiper-wrapper is calling the destroy and thats why the bug exists when using that library. @nolimits4web would you like me to make new issue or even look into making PR for this? So the bug is definitely in the destroy not removing some event listener.

0reactions
lock[bot]commented, Jun 25, 2018

This thread has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs.

Read more comments on GitHub >

github_iconTop Results From Across the Web

iPad Safari scrolling causes HTML elements to disappear and ...
However, the element does not appear until I lift my finger off the screen and the scroller finishes all its animations. This is...
Read more >
Swiper Changelog
New centeredSlidesBounds parameter that when enabled will keep first and last slides at bounds; Fixed issue when freeMode could break position on resize ......
Read more >
Touch events - Web APIs - MDN Web Docs - Mozilla
When a touchstart event occurs, indicating that a new touch on the surface has occurred, the handleStart() function below is called.
Read more >
docs - Apple Open Source
As a result, the merge 2 vectors of OperatingDate objects, we can: 1. ... (WebKit::WebPage::mouseEvent): No need to always pass a boolean parameter...
Read more >
mapbox-gl | Yarn - Package Manager
2.11.1. Bug fixes. Fix support for line breaks in labels that follow line geometries (#12377). 2.11.0. Features ✨ and improvements.
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found