mirror of
https://github.com/Stremio/stremio-web.git
synced 2026-04-18 12:52:52 +00:00
fix(player/statistics): prevent menu from closing on inside click
This commit is contained in:
parent
129f510047
commit
49240a4e0f
1 changed files with 4 additions and 1 deletions
|
|
@ -8,8 +8,11 @@ const styles = require('./styles.less');
|
|||
|
||||
const StatisticsMenu = React.memo(React.forwardRef(({ className, peers, speed, completed, infoHash }, ref) => {
|
||||
const { t } = useTranslation();
|
||||
const onMouseDown = React.useCallback((event) => {
|
||||
event.nativeEvent.statisticsMenuClosePrevented = true;
|
||||
}, []);
|
||||
return (
|
||||
<div ref={ref} className={classNames(className, styles['statistics-menu-container'])}>
|
||||
<div ref={ref} className={classNames(className, styles['statistics-menu-container'])} onMouseDown={onMouseDown}>
|
||||
<div className={styles['title']}>
|
||||
{t('PLAYER_STATISTICS')}
|
||||
</div>
|
||||
|
|
|
|||
Loading…
Reference in a new issue