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

Scroll bar is hidden when moving slider #38

Closed
RyanGosden opened this issue Jan 11, 2022 · 6 comments
Closed

Scroll bar is hidden when moving slider #38

RyanGosden opened this issue Jan 11, 2022 · 6 comments

Comments

@RyanGosden
Copy link

RyanGosden commented Jan 11, 2022

Minor issue which causes the page to 'jump' to the hiding and showing of scrollbar.

Edit: Looking at your src, it seems like this is deliberate. Is there a specific reason to why the scrollbar is disabled?

@tobkum
Copy link

tobkum commented Apr 29, 2022

Wondering the same here, that makes for weird jumps in the layout

@j3ll3yfi5h
Copy link

Same issue here...

@j3ll3yfi5h
Copy link

Workaround here:
j3ll3yfi5h@516da11

@kylewetton
Copy link
Owner

@RyanGosden @tobkum @j3ll3yfi5h

The code is meant to keep your scrollbar offset in tact so that your layout doesn't jump. My layout doesn't jump on my end. I've just testing Windows and Mac across a range of browsers.

The reason for the body scroll lock is for mobile support, the page should remain fixed when you're interacting with the compare viewer with your finger. It will outright break vertical option if it doesn't lock.

What browsers / devices are you using that your layout is popping?

Does the demo pop for you?

https://image-compare-viewer.netlify.app/

@j3ll3yfi5h
Copy link

@kylewetton

If you add...

html {
    overflow-y: scroll;
}

...you will see the jumping as well.

I'm currently trying to find out, if scrollbars on html-elements are wrong and why or not...

@j3ll3yfi5h
Copy link

This issue is based on the used library https://github.com/willmcpo/body-scroll-lock

Related (unresolved) issues are:
willmcpo/body-scroll-lock#108
willmcpo/body-scroll-lock#244

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

4 participants