fix(MetaItem): libitems menu behavior

This commit is contained in:
Tim 2024-02-15 03:06:28 +01:00
parent 95e33666bd
commit 8f4bcb4d26

View file

@ -32,16 +32,13 @@ const MetaItem = React.memo(({ className, type, name, poster, posterShape, poste
null;
}, [deepLinks]);
const metaItemOnClick = React.useCallback((event) => {
if (typeof props.onClick === 'function') {
props.onClick(event);
}
if (event.nativeEvent.selectPrevented) {
event.preventDefault();
} else if (typeof props.onClick === 'function') {
props.onClick(event);
}
}, [props.onClick]);
const menuOnClick = React.useCallback((event) => {
event.stopPropagation();
event.nativeEvent.selectPrevented = true;
}, []);
const menuOnSelect = React.useCallback((event) => {