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

Modal activation scrolls page to top automatically #277

Open
ghost opened this issue Jun 16, 2020 · 5 comments
Open

Modal activation scrolls page to top automatically #277

ghost opened this issue Jun 16, 2020 · 5 comments

Comments

@ghost
Copy link

ghost commented Jun 16, 2020

The modal link I am trying to use is in the second fold of the page, but every time the modal is activated, the page in the background automatically scrolls to the top of the page. Is there a way I can stop this behavior?

@Blockworx
Copy link

I would like to see a solution to this please. I'm sure it's an easy fix!

@r-hallman
Copy link

I have worked out what is going on with this thanks to this post https://stackoverflow.com/a/54747795

I edited the js, changing
this.$body.css("overflow","hidden")
to
this.$body.css("overflow","unset")

...and it did the trick!

@Zenoo
Copy link

Zenoo commented Jul 3, 2021

This issue seems fixed in the current version. See the demo

@Fwanz
Copy link

Fwanz commented Oct 15, 2021

This issue is not fixed, I'm having the scroll top issue.

@etekinbas
Copy link

I have worked out what is going on with this thanks to this post https://stackoverflow.com/a/54747795

I edited the js, changing this.$body.css("overflow","hidden") to this.$body.css("overflow","unset")

...and it did the trick!

Changing if(this.$body=o("body") to if(this.$body=o("html") will be much better.

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

No branches or pull requests

5 participants