intro.js icon indicating copy to clipboard operation
intro.js copied to clipboard

onSkip callback returns void instead of boolean ?

Open anuragsati opened this issue 6 months ago • 0 comments

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",

anuragsati avatar Aug 04 '24 03:08 anuragsati