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

How to make a modal's content scrollable, if there is more content #104

Closed zigax1 closed 11 months ago

zigax1 commented 1 year ago

I'm submitting a instructions or feature request, if it doesn't exist yet.


[ ] 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
[x] Support request
[ ] Other... Please describe:

Current behavior

If i lower the height of the screen, the content which was before in modal window dissapears, instead of changing state to scroll. I tried adding overflow-y: auto to all the html components in my modal window, but it doesn't solve the issue.

Expected behavior

When there is more content in the modal window, the scroll should appear. Instead of this, currently the content just dissapear

Minimal reproduction of the problem with instructions

You just add a lot of content inside the <div class="modal-edit">....................</div>, like adding just a lot of lorem ipsum will also reproduce the problem. You just need a lot of content inside modal window, and the content would go over a modal window, instead of showing a scroll.

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

It would be a great feature, since I will have many more modal windows in my applicaton, which will have more content

Environment


Angular version: 15

Browser:
- [X] Chrome (desktop) version XX
- [ ] Chrome (Android) version XX
- [X] Chrome (iOS) version XX
- [X] Firefox version XX
- [ ] Safari (desktop) version XX
- [ ] Safari (iOS) version XX
- [ ] IE version XX
- [X] Edge version XX

For Tooling issues:
- Node version: v16.20
- Platform:  Linux, Windows            
zigax1 commented 1 year ago

I solved it by myself.

In styles.scss file, I added those two styles:

ngneat-dialog {
  .ngneat-dialog-backdrop {
    overflow: hidden !important;
    .ngneat-dialog-content {
      overflow: auto !important;
    }
  }
}
NetanelBasal commented 11 months ago

Great to hear