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:
parent
e621c7a2a5
commit
05b7f6f4d9
@ -34,6 +34,8 @@ export const GroupPopover = ({
|
|||||||
open={open}
|
open={open}
|
||||||
anchorEl={anchorEl}
|
anchorEl={anchorEl}
|
||||||
onClose={onPopoverClose}
|
onClose={onPopoverClose}
|
||||||
|
disableScrollLock={true}
|
||||||
|
disableRestoreFocus={true}
|
||||||
anchorOrigin={{
|
anchorOrigin={{
|
||||||
vertical: 'bottom',
|
vertical: 'bottom',
|
||||||
horizontal: 'left',
|
horizontal: 'left',
|
||||||
|
Loading…
Reference in New Issue
Block a user