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

modal component block scroll implement #8868

Open
zhangyunhai2021 opened this issue Nov 11, 2024 · 0 comments
Open

modal component block scroll implement #8868

zhangyunhai2021 opened this issue Nov 11, 2024 · 0 comments
Assignees

Comments

@zhangyunhai2021
Copy link

What problem does this feature solve?

I am implementing a function similar to the modal component. When the mask layer or modal component appears, the body is prohibited from scrolling. Since I need to deal with the problem of zooming in and out of the mobile terminal, I use position:fix to control it, but it is required when the modal is destroyed. The page remains in its original position, so the window.scrollTo() method is used. The problem is that after using this method, the page will scroll from the top to the original position, which is not a good experience.

What does the proposed API look like?

I want the same effect as the modal component in the ng-zorro-antd component library. How can I achieve it?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants