mirror of
https://github.com/Stremio/stremio-web.git
synced 2026-04-20 06:32:11 +00:00
fix(player): cancel hold-to-speed-up timer when menus open
This commit is contained in:
parent
49240a4e0f
commit
b2d81c09ee
1 changed files with 7 additions and 2 deletions
|
|
@ -765,9 +765,14 @@ const Player = ({ urlParams, queryParams }) => {
|
|||
}, [settings.escExitFullscreen]);
|
||||
|
||||
React.useLayoutEffect(() => {
|
||||
if (menusOpen) {
|
||||
pressTimer.current = null;
|
||||
longPress.current = false;
|
||||
}
|
||||
|
||||
const onKeyDown = (e) => {
|
||||
if (e.code !== 'Space' || e.repeat) return;
|
||||
if (menusOpen || nextVideoPopupOpen) return;
|
||||
if (menusOpen) return;
|
||||
|
||||
longPress.current = false;
|
||||
|
||||
|
|
@ -805,7 +810,7 @@ const Player = ({ urlParams, queryParams }) => {
|
|||
|
||||
const onMouseDownHold = (e) => {
|
||||
if (e.button !== 0) return; // left mouse button only
|
||||
if (menusOpen || nextVideoPopupOpen) return;
|
||||
if (menusOpen) return;
|
||||
if (controlBarRef.current && controlBarRef.current.contains(e.target)) return;
|
||||
|
||||
longPress.current = false;
|
||||
|
|
|
|||
Loading…
Reference in a new issue