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

Body scroll blocking when component attached to container #112

Open
Romko775 opened this issue Aug 28, 2023 · 1 comment
Open

Body scroll blocking when component attached to container #112

Romko775 opened this issue Aug 28, 2023 · 1 comment
Labels
enhancement New feature or request

Comments

@Romko775
Copy link

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:

@NetanelBasal
Copy link
Member

You're welcome to create a PR

@NetanelBasal NetanelBasal added the enhancement New feature or request label Nov 1, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants