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

Once hidden, next button doesn't show up #153

Open
mikocot opened this issue Nov 17, 2020 · 0 comments
Open

Once hidden, next button doesn't show up #153

mikocot opened this issue Nov 17, 2020 · 0 comments

Comments

@mikocot
Copy link

mikocot commented Nov 17, 2020

When mixing steps between those that require user interaction and those that only highlight items it's useful to turn on and of the next button for every step independently. As much as this works for the previous button, it doesn't for the 'next'.

The only way to bring back the next button after it was hidden once is to use the event_type: next. It's not a big issue, but on the other hand it prevents us from also accepting 'click' as an alternative condition to move to the next step, which in some cases is still convenient to have.

This behavior is rather clear from the code:

//here, unless specifically set to true 'next' is hidden, but if it was hidden already, regardless the value, there is no logic to show it
          if (step_data.showNext !== true) {                    
            $body.enjoyhint("hide_next");
          }
          
          $body.enjoyhint("hide_prev");

          if(current_step !== 0) {
            $body.enjoyhint("show_prev");
          }

          if (step_data.showPrev == false) {
            $body.enjoyhint("hide_prev");
        }

          if (step_data.showSkip == false) {
            $body.enjoyhint("hide_skip");
          } else {
            $body.enjoyhint("show_skip");
          }

I believe that forcing showNext: true should still allow to show the next button regardless the event type.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant