sforkowany z mirror/soapbox
prevent scrolling when focused
rodzic
d19f8a267a
commit
f068d6280d
|
@ -64,7 +64,7 @@ const DropdownMenuItem = ({ index, item, onClick }: IDropdownMenuItem) => {
|
|||
const firstItem = index === 0;
|
||||
|
||||
if (itemRef.current && firstItem) {
|
||||
itemRef.current.focus();
|
||||
itemRef.current.focus({ preventScroll: true });
|
||||
}
|
||||
}, [itemRef.current, index]);
|
||||
|
||||
|
|
Ładowanie…
Reference in New Issue