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

[@mantine/hooks] use-focus-trap: Fix animation bug for modal (#1753) #2267

Merged
merged 1 commit into from Sep 8, 2022

Conversation

hotgen
Copy link
Contributor

@hotgen hotgen commented Aug 28, 2022

No description provided.

@rtivital
Copy link
Member

Hi @hotgen, is this related to one of the open issues?

@hotgen
Copy link
Contributor Author

hotgen commented Aug 28, 2022

@rtivital Hi, yes, it's fix for "slide-left transition looks off on modal with size set" #1753. The focus call shifts the scroll and thus breaks the animation.

@wes337
Copy link
Contributor

wes337 commented Aug 29, 2022

This does seem to fix the bug in the issue. But are there other side effects to this solution? What if the useFocusTrap hook focuses an element outside the viewport, and we want to scroll?

@rtivital
Copy link
Member

What if the useFocusTrap hook focuses an element outside the viewport, and we want to scroll?

There should not be such case, focus trap should always be used on visible elements, any scrolling caused by use-focus-trap in unwanted.

I was thinking that it will resolve the issue with Menu – #1982

@rtivital rtivital merged commit 56d9c6a into mantinedev:master Sep 8, 2022
@rtivital
Copy link
Member

rtivital commented Sep 8, 2022

Thanks!

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

Successfully merging this pull request may close these issues.

None yet

3 participants