-
Notifications
You must be signed in to change notification settings - Fork 2.6k
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
Tour tooltip position inside elements with scroll is wrong #210
Comments
I was having a problem with the position and your code solved it. Thanks! |
This fix worked for me as well, thank you. Is there any plans to get this merged in? |
This worked for me as well. I've had to make 3 changes outlined in bug reports to get the framework working properly. Can we get these things merged in? |
I think this would also solve the problem with helperLayer positioning being incorrect when the parent has a border as offsetParent does not seem to take borders into account. |
It's better people start with x and y 0 in position. //start top of application |
🍻 |
+1, any canonical answer for this? I had to combine this with the fix described in #350 to get this to work in my application |
Taken directly from usablica#210
I'm hosting a fork of this at https://github.com/c-johnson/intro.js/blob/master/intro.js if anybody needs to use this as a temporary solution. Combining with #350 above gives me the solution I want. It looks like this possibly addresses concerns raised in #182. Again, this alone didn't fix my problem, I had to combine with manual scrolling behavior to get it to work |
Same problem here, any activity on this? |
I was having the same issue, and your code worked fixed it. Thanks again for sharing it. |
I'm using IntroJS with SharePoint Online and was having this exact issue with scrolling to web parts that are further down the page. Replacing the _getOffset method with the one from @samiracho worked! But like @c-johnson mentioned, I had to also include code to force the scroll of the workspace container to the target element. Something like this: var intro = introJs();
var workspace = document.querySelector("#s4-workspace");
intro.onbeforechange(function (targetElem) {
workspace.scrollTop = targetElem.offsetTop - workspace.offsetTop;
}); Thanks everyone! |
I will take a look at this and see if I can get a PR ready for this and #350. Thanks for the help. |
Scroll parent element to targetElement; resolves usablica#210; resolves usablica#350;
Scroll parent element to targetElement; resolves usablica#210; resolves usablica#350;
The way the offsets are calculated doesnt work if the element is inside another element with scroll. I fixed it changing _getOffset function and using "getBoundingClientRect" function (more reliable than the while loop approach)
The text was updated successfully, but these errors were encountered: