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

onafterchange is clearly not called after the change #936

Closed
AntoineWtrnd opened this issue Jul 6, 2019 · 5 comments
Closed

onafterchange is clearly not called after the change #936

AntoineWtrnd opened this issue Jul 6, 2019 · 5 comments
Labels

Comments

@AntoineWtrnd
Copy link

AntoineWtrnd commented Jul 6, 2019

Description

Have a custom Focus callback when onafterchange, it focus, but it focus before the tooltip appear, then, the focus dissapear because tooltip has not been finished to shown.

So, "onafterchange", no way. This not working. This is the same as onbeforechange. Exactly the same except some minutes delays.

Also, i can't believe all these callback without a onNext.

Bootstrap Tour look much better...

@sr9yar
Copy link

sr9yar commented Oct 8, 2019

I just spent a couple of hours trying to customize my tour in firm belief 'onafterchange' is in fact called after all changes are done.
Learnt the truth the hard way ....

@sr9yar
Copy link

sr9yar commented Oct 16, 2019

I managed to handle this by using a MutationObserver.

const observer = new MutationObserver((mutations) => {  
    const { target } = mutations[0];

    document.querySelector('.introjs-tooltip').style.top = `${      
        document.querySelector('.introjs-helperLayer').clientHeight
        - document.querySelector('.introjs-tooltip').clientHeight - 10}px`;

    return null; });

observer.observe(   
    document.querySelector('.introjs-tooltip'),     
    { attributes: true, attributeOldValue: true, attributeFilter: ['style'] }, 
);

Thanks for this great library. An update on this issue would be much appreciated.

@stale
Copy link

stale bot commented Oct 13, 2020

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.

@stale stale bot added the wontfix label Oct 13, 2020
@stale stale bot closed this as completed Oct 20, 2020
@bartimez
Copy link

Also having this issue. onafterchange is called before the tooltip location is calculated, making calling refresh in an onafterchange worthless

@xand7
Copy link

xand7 commented May 20, 2021

This continues to be an issue for me.

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

4 participants