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

Show hints based on step #1969

Open
SebastianStehle opened this issue Jul 26, 2023 · 2 comments
Open

Show hints based on step #1969

SebastianStehle opened this issue Jul 26, 2023 · 2 comments

Comments

@SebastianStehle
Copy link

Description

I have a custom step definition with multiple hints per step. I would like to show the hints per step and use callbacks to control the behavior. I tried addHints or showHints, but it does not work. The full flow gets destroyed.

Expected Behavior

Just show the hints

Actual Behavior

No error, but the tour stops.

Example (recommended)

https://jsfiddle.net/uw03tgzL/

@SebastianStehle
Copy link
Author

I got it working somehow.

When you delay the hints, it seems to work, see: https://jsfiddle.net/2b6mej1k/3/

The other problem is that the hints do not have a proper z-index. I am sure it makes sense somehow, but perhaps there should be an API for that.

I have tested several delays and even 2 seconds was sometimes not enough.

setTimeout(() => {
                intro.removeHints();
                intro.setOption('hints', step.hints);
                intro.showHints();
                
                document.querySelectorAll('.introjs-hint').forEach(hint => {
                    hint.style.zIndex = '10000000';
                })
            }, 5000);

@binrysearch
Copy link
Contributor

This is great! We released a new version today which drastically improves the TypeScript types. Could you please rebase?

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

No branches or pull requests

2 participants