-
Notifications
You must be signed in to change notification settings - Fork 61
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
Modal type step top position is wrong #61
Comments
Hi, thanks for raising this. Under what conditions are you seeing this behaviour occur? The plugin should be scrolling whichever element needs to be scrolled back to 0. You mentioned complex conditions for the scroll? |
line 268: conditions for scrolling |
…toScroll: false` will now stop the plugin from scrolling - #61
Hi @Nogostradamus, thanks for your reply. There are actually two additional bugs here:
I've merged your code into a new Would you mind checking that the dev branch version works for you? In theory, it shouldn't make any difference in your case due to the scrolling bug. |
Hi,
Also I have one more issue but I will start a new topic with that. |
I have played with that for a while and I found out that there is an issue with scrollTarget. scrollTarget is body element. When using $('html, body') instead is fine. It applies to both modal and tooltips. Also that's why conditional 1.a.b.c is not triggered as well. |
…'html' to the fallback 'body' selector - related #61
Thanks for taking the time to look into this @Nogostradamus! I've added two commits to the dev branch, one for the |
The size of the highlight is correct - it is supposed to be a bit larger than the element. I've no idea why you are getting those rough lines and choppy animation though... what browser are you using? |
I have tested it on both Firefox and Chrome (latest versions). Ps. Oh, I know why I have that rough edges. I forgot I have changed the background opacity in css file. That's why it doesn't fit the color on edges. My fault. |
When page is long and your scroll position is on the bottom the modal type step is displayed on the very top on the screen (top 25%):
$jpwTooltip.css({
'position': 'absolute',
'left': '50%',
'top': '25%',
'margin-left': -(parseInt(step.popup.width, 10) + 60) / 2 + 'px',
'z-index': '999999'
});
To see that you need to scroll up.
I think it should calculate the scroll position like that:
'top': 'calc('+$(document).scrollTop()+'px + 25%)'
That way it will be displayed in top25% of the current position. The scroll is not triggered in most of the cases because of the complex conditions for scroll. This will prevent that and you won't seen the blank screen with hidden content on top.
In my project I have removed scroll for modals and display that on the current scroll and removed all conditions for scroll to be active all the time. So I can see nice transitions fade in/out for each step.
The text was updated successfully, but these errors were encountered: