Skip to content

Modal type step top position is wrong #61

@Nogostradamus

Description

@Nogostradamus

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions