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.

Using more than two controllers gives a "Uncaught RangeError: Maximum call stack size exceeded"

See original GitHub issue

Hi,

I want to have three Swipers with the same amount of slides that run in sync. When 1 one of the Swiper is controlled the others should behave accordingly. I tried to do this with param.control, but it throws a RangeError on me. To verify the error, if I remove one of the control lines it works flawlessly, but only for two Swipers.

desktopSwiper.params.control = [iphoneSwiper, ipadSwiper];
iphoneSwiper.params.control  = [ipadSwiper, desktopSwiper];
ipadSwiper.params.control = [iphoneSwiper, desktopSwiper];

Issue Analytics

  • State:closed
  • Created 8 years ago
  • Comments:6 (2 by maintainers)

github_iconTop GitHub Comments

2reactions
wgroenewoldcommented, Jun 17, 2015

Managed to “solve” it: -Make an empty global variable swiperController. -Give every swiper the following callback functions: -onTouchStart set the swiperController to the name of the current swiper -onSlideChangeStart check if the swiperController is the current swiper, if true slide the other swipers. -onSlideChangeEnd unset the swiperController

This way the current touched swiper acts as as master and the other ones as slaves and only triggers the callbacks if the swiperController var is set as master.

Would be nice if this would function natively.

0reactions
nolimits4webcommented, Nov 13, 2017

Issue is closed because of outdated/irrelevant/not actual/needed more information/inactivity.

If this issue is still actual and reproducible for latest version of Swiper, please create new issue and fill the issue template correctly:

  • Clearly describe the issue including steps to reproduce when it is a bug.
  • Make sure you fill in the earliest version that you know has the issue.
  • Provide live link or JSFiddle/Codepen or website with issue
Read more comments on GitHub >

github_iconTop Results From Across the Web

JavaScript RangeError: Maximum Call Stack Size Exceeded
In case this error occurs due to an excessive number of function calls or variables, these should be reduced as much as possible....
Read more >
RangeError: Maximum call stack size exceeded
You are getting Maximum call stack size exceeded because your function is an infinite loop. if(true) will always be true, so your first ......
Read more >
JavaScript Error: Maximum Call Stack Size Exceeded
If you see the “Maximum Call Stack Size Exceeded” error, there's likely a problem with a recursive function within your JavaScript code.
Read more >
Uncaught RangeError: Maximum call stack size exceeded
I can replicate this using a recursive JavaScript function on Chrome 7: Say you have this ridiculous function: // ... ... }; And...
Read more >
Maximum call stack size exceeded error and angularjs with ...
If I use remote data binding kendo.all.js return Maximum call stack size exceeded error. Whats wrong? Thanks. controller:.
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