Merge pull request #584 from Stremio/bug-fix-multiselect-redirect

fix: added code to prevent the onClick redirect
This commit is contained in:
Tim 2024-02-15 18:28:15 +01:00 committed by GitHub
commit 5499f86d3c
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -32,12 +32,10 @@ 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) => {