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.

Prevent user from advancing slide until condition is met

See original GitHub issue

Not a bug, just a question on functionality.

I want to use the behaviour you get when swiping the last slide in the slideshow, but not just at the end, but on each slide unless a certain condition is met.

E.g. You have a slide with a form field, when the field is not valid and you try and swipe, you can see some of the next slide but it won’t let you advance and bounces back, like the last slide of a normal slider. When the form field is valid, you can swipe the slide as normal.

Anyone found a solution to be able to do this?

onSwipe fires before beforeChange so I can’t get the current slide index - which I could use to check if that slide is valid. I could use afterChange to move the slider back one slide, but that would be allowing the user to advance to the next slide, which I don’t want.

Any advice appreciated!

Issue Analytics

  • State:closed
  • Created 5 years ago
  • Reactions:3
  • Comments:5

github_iconTop GitHub Comments

1reaction
paulcredmondcommented, Apr 1, 2021

@Dobby89 We did but it’s so long ago I can’t remember and don’t have access to the code, sorry 😦

0reactions
Dobby89commented, Feb 2, 2021

I’d also like this functionality. I tried using beforeChange to prevent the slide from advancing, but it didn’t work.

@paulcredmond Did you manage to come up with a solution (short of dynamically adding/removing slides)?

Read more comments on GitHub >

github_iconTop Results From Across the Web

Restricting Advancing - Articulate Storyline Discussions
Hello, is there a way to place a restriction on a scene that won't allow a user to advance to another scene untill...
Read more >
How to stop Powerpoint from jumping to next/previous slide ...
I have searched for an answer to this, but all I can find are ... How to stop Powerpoint from jumping to next/previous...
Read more >
How To Stop Google Slides from Auto-Advancing When You ...
A great strategy to stop Google Slides from auto-advancing is to insert a shape that covers the whole slide and link it to...
Read more >
A way to move to next slide on condition only - H5P
The question is really about a relationship between Course Presentation and the modules that you use on the pages of that presentation. Seems ......
Read more >
Zoom Slide Control for presentations: allow others to advance ...
To stop someone from controlling the slides, click on the Stop Slide Control button on your screen (shown in the screen capture above)....
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