Skip to content

onSkip callback returns void instead of boolean ? #2070

@anuragsati

Description

@anuragsati

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions