dialog icon indicating copy to clipboard operation
dialog copied to clipboard

Body scroll blocking when component attached to container

Open Romko775 opened this issue 1 year ago • 1 comments

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

When trying to make a portal or directly call dialog when loading for specific components blocks (lets assume like a dashboard), the body was set with ngneat-dialog-hidden class and blocks entire page scroll.

Expected behavior

Choose which DOM element scroll should be blocked (body, container it attached to etc)

Minimal reproduction of the problem with instructions

constructor(
        private dialogService: DialogService,
        private el: ElementRef
    ) {
      this.dialogService.open(SpinnerBoxComponent, {
            container: this.el,
            closeButton: false,
            enableClose: false,
            width: 'auto',
        })
    }

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

The possibility to control the dialog component per component scope (like dashboard module stats etc) and to not block page scroll.

Environment


Angular version: 14.1.2

Browser:
- [ ] Chrome (desktop) version XX
- [ ] Chrome (Android) version XX
- [ ] Chrome (iOS) version XX
- [ ] Firefox version XX
- [ ] Safari (desktop) version XX
- [ ] Safari (iOS) version XX
- [ ] IE version XX
- [X] Edge version 116.0.1938.54 (Official build) (arm64)
 
For Tooling issues:
- Node version: XX  
- Platform:  

Others:

Romko775 avatar Aug 28 '23 10:08 Romko775