1
0
mirror of https://github.com/Unleash/unleash.git synced 2024-12-22 19:07:54 +01:00

fix: involuntarily scrolled to the top when mousing off group/project avatars (#7287)

This PR fixes a bug where if you navigated to the projects page via the
menu, scrolled down, and hovered over a project's avatars, you'd be
scrolled to the top of the page when you moused off the avatar.

Turns out this issue was also in the group cards. It seems to be that
the popover attempts to restore focus back to where you where, which, if
you navigated via the menu, is at the top of the page. Because these
popovers don't have any focusable content, we can disable that
functionality.

Additionally, I've disabled the scroll lock when the popover is open.
The scroll lock made it impossible to scroll when one of the popovers is
open, which is confusing as a user.
This commit is contained in:
Thomas Heartman 2024-06-05 13:46:36 +02:00 committed by GitHub
parent e621c7a2a5
commit 05b7f6f4d9
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -34,6 +34,8 @@ export const GroupPopover = ({
open={open}
anchorEl={anchorEl}
onClose={onPopoverClose}
disableScrollLock={true}
disableRestoreFocus={true}
anchorOrigin={{
vertical: 'bottom',
horizontal: 'left',