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 blocking removes scrollbar, causes content to shift #279

Open
jjsiman opened this issue Apr 24, 2020 · 1 comment
Open

Scroll blocking removes scrollbar, causes content to shift #279

jjsiman opened this issue Apr 24, 2020 · 1 comment

Comments

@jjsiman
Copy link

jjsiman commented Apr 24, 2020

I'm submitting a ... (check one with "x")

[ ] bug report => search github for a similar issue or PR before submitting
[x] feature request
[ ] support request => Please do not submit support request here, post on Stackoverflow or Gitter

Current behavior
The current implementation of the scroll blocker adds overflow: hidden to the body. This removes the scrollbar and causes the content in the background to shift.

Expected behavior
The overlay and modal could exist on top of the overflowed background content. When opened, the background would still have a scrollbar, but would not be scrollable. Angular Material's mat-dialog does this.

Reproduction of the problem
This occurs on the demo page.

What is the motivation / use case for changing the behavior?
Can lead to jittery behavior for users. For instance, items laid out in an inline grid may be shifted down rows.

Please tell us about your environment:
macOS Catalina 10.15.4

  • Smart Modal version: 0.8.x
    7.4.0

  • Angular version: 2.0.x
    9.1.0

@maximelafarie
Copy link
Owner

Hi @jjsiman, I see what you mean. I'll take a look at it and see if it can take place in our non-breaking changes features roadmap.

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

No branches or pull requests

2 participants