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

Move overflow:hidden from <html> to <body> tag? #397

Open
PhilippGrashoff opened this issue Nov 8, 2019 · 2 comments
Open

Move overflow:hidden from <html> to <body> tag? #397

PhilippGrashoff opened this issue Nov 8, 2019 · 2 comments

Comments

@PhilippGrashoff
Copy link

PhilippGrashoff commented Nov 8, 2019

Hi,

I had the issue that my page always jumped to the top when opening a featherlight modal. Especially annoying when using a mobile where a lot of scrolling is made. I had the issue on both Chrome and Firefox.

After reading into that I figured its the overflow:hidden added to the <html> tag. Reading about other modal scripts and that issue, most others added the overflow:hidden to the <body> tag, not to <html>.

After moving the overflow:hidden from <html> to <body>, my problem disappeared.

@marcandre
Copy link
Collaborator

Sorry about that. Sounds better in the body tag. Could you make a PR changing the CSS stylesheet? Let's not change where the with-featherlight class is added.

@phoebusryan
Copy link

So this problem still exists after 1.5 years? :-/

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

3 participants