ngneat / dialog

👻 A simple to use, highly customizable, and powerful modal for Angular Applications
https://ngneat.github.io/dialog/
MIT License
394 stars 38 forks source link

Create dialogs that don't block scrolling behind backdrop #116

Closed Tlepel closed 3 months ago

Tlepel commented 11 months ago

I'm submitting a...


[ ] Regression (a behavior that used to work and stopped working in a new release)
[ ] Bug report  
[ ] Performance issue
[x] Feature request
[ ] Documentation issue or request
[ ] Support request
[ ] Other... Please describe:

Current behavior

Whenever a modal is opened, the overflow of the body will be hidden

Expected behavior

Modals can be created that don't necessarily have to hide the overflow. If all open modals have this setting, the body shouldn't get the overflow: hidden property. If any of the modals doesn't have this setting, it should behave the same as before.

Minimal reproduction of the problem with instructions

What is the motivation / use case for changing the behavior?

We sometimes use the modals as an information-overlay. However, the information is an addition to the page contents of that moment. The modal backdrop helps in this case, since it disables clicks on elements on the page, but it would be beneficial if the page contents could still be scrollable.

Tlepel commented 11 months ago

I'm fine with giving this a try myself by the way, seems like an interesting challenge.

netanel-utila commented 11 months ago

You are welcome to create a PR

netanel-utila commented 11 months ago

Try to check the angular material dialog impl