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

Fix for scroll position going to Top when using multple modals #530

Merged
merged 2 commits into from
Feb 19, 2024

Conversation

00anwi
Copy link
Contributor

@00anwi 00anwi commented Aug 9, 2023

Added check for SetFocus for disabling it when ActivateFocusTrap is set to false.

As if you have opened multiple modals and close top modal, scroll position goes to the top. The only way to stop this behavior in before this change is by using CustomLayout. With this change you only need to set ModalOption>ActivateFocusTrap to false.

Before
https://github.com/Blazored/Modal/assets/8648447/715c2b25-12b5-44a3-9e21-5118731dc6aa

After
https://github.com/Blazored/Modal/assets/8648447/ac7df9e6-bee3-4c34-a3cf-c593b65cebca

andreaswinges and others added 2 commits August 9, 2023 11:03
…et to false.

As if you have opened multiple modals and close top modal scroll position goes to the top.
The only way to stop this behavior in previus version was by using CustomLayout.
With this change you only need to set ModalOption>ActivateFocusTrap to false.
@chrissainty chrissainty added the Bug Something isn't working label Feb 19, 2024
@chrissainty chrissainty merged commit c9b2118 into Blazored:main Feb 19, 2024
2 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Bug Something isn't working
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants