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

onSkip callback returns void instead of boolean ? #2070

Open
anuragsati opened this issue Aug 4, 2024 · 0 comments
Open

onSkip callback returns void instead of boolean ? #2070

anuragsati opened this issue Aug 4, 2024 · 0 comments
Labels

Comments

@anuragsati
Copy link

Description

I tried to use the onSkip callback which is surprisingly not documented.
My use-case is whenever we click on the skip button it shows us a confirmation prompt and if you cancel it, it should continue the tour.
The same behavior we have in onBeforeExit.

But I noticed it does not behave the same, is this behavior intended?

     intro.onSkip(function () {
          return confirm("Are you sure you want to exit the guide for this section?");
     });

I noticed that introSkipCallback in the Tour class returns void instead of a boolean like in introBeforeExitCallback

Expected Behavior

On the confirmation popup if we press cancel it should continue the tour. If we press yes then it should stop the tour.

Environment

"react": "^18.3.1",
"intro.js": "8.0.0-beta.1",
@binrysearch binrysearch added the bug label Sep 1, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants