featherlight icon indicating copy to clipboard operation
featherlight copied to clipboard

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

Open PhilippGrashoff opened this issue 6 years ago • 2 comments

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.

PhilippGrashoff avatar Nov 08 '19 00:11 PhilippGrashoff

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.

marcandre avatar Nov 15 '19 14:11 marcandre

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

phoebusryan avatar May 23 '21 09:05 phoebusryan