-
Notifications
You must be signed in to change notification settings - Fork 687
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
Disabling scroll when dialog is open #206
Comments
+1 |
Why would you have overflow-y scroll in html tag? Can't you just remove it. You won't be able to achieve what you need if the html tag is forcing the scroll. Perhaps you can dynamically modify the html tag when the dialog is open by either changing the attribute or some class with !important at the end. |
@jerepaajanen I think it could be a bit unexpected for users if we apply what you propose by default (maybe users still want to have scrolling of body when they open the dialog). For me, it looks like this functionality could be implemented as an optional parameter called ie. Your thoughts? |
As a optional parameter that could be really nice. When html/body scroll isn't disabled, it is kinda troublesome to scroll a bit longer dialogs especially when viewing in small screes or mobile. Only background site is scrolled, not the actual dialog. |
Ok, then added to the features list for future releases. |
Hi just wondering when this might be going live? As without it ngDialog really doesn't work well on long pages and often locks up. |
When this is going to live? |
@jerepaajanen After some diving into source code I noticed that we already have CSS class |
@egor-smirnov That would work perfectly. |
@egor-smirnov Sounds great! |
👍 |
@marmotz +1 looks pretty good! There's a bit of code duplication with how you're adding/removing the @egor-smirnov What do you think? |
@davidvuong I've updated README.md file. |
@davidvuong Here is a little refactoring following your advice. |
@davidvuong @marmotz let's move discussion to #280 |
Disable scroll when dialog is open (fix #206)
This has the unfortunate side effect of bumping the user up to the top of a long page whenever a dialog is opened. The previous functionality opened the dialog in-place, which feels more natural to me, but will also probably surprise some people when upgrading. I'm not sure there's an ideal solution (open in-place AND disable scrolling), but this change can be overridden in the project CSS to match the old behavior:
|
Is it possible to disable scrolling when dialog is open? Overflow: hidden in body doesn't work because I'm using front-end framework that has overflow-y: scroll in html-tag.
The text was updated successfully, but these errors were encountered: