mirror of
https://github.com/Stremio/stremio-web.git
synced 2026-04-21 03:22:11 +00:00
Merge pull request #1175 from Stremio/fix/hold-speed-up-during-menus
fix: prevent hold-to-speed-up when menus are open
This commit is contained in:
commit
ebc7c5bdde
1 changed files with 2 additions and 0 deletions
|
|
@ -767,6 +767,7 @@ const Player = ({ urlParams, queryParams }) => {
|
||||||
React.useLayoutEffect(() => {
|
React.useLayoutEffect(() => {
|
||||||
const onKeyDown = (e) => {
|
const onKeyDown = (e) => {
|
||||||
if (e.code !== 'Space' || e.repeat) return;
|
if (e.code !== 'Space' || e.repeat) return;
|
||||||
|
if (menusOpen || nextVideoPopupOpen) return;
|
||||||
|
|
||||||
longPress.current = false;
|
longPress.current = false;
|
||||||
|
|
||||||
|
|
@ -804,6 +805,7 @@ const Player = ({ urlParams, queryParams }) => {
|
||||||
|
|
||||||
const onMouseDownHold = (e) => {
|
const onMouseDownHold = (e) => {
|
||||||
if (e.button !== 0) return; // left mouse button only
|
if (e.button !== 0) return; // left mouse button only
|
||||||
|
if (menusOpen || nextVideoPopupOpen) return;
|
||||||
if (controlBarRef.current && controlBarRef.current.contains(e.target)) return;
|
if (controlBarRef.current && controlBarRef.current.contains(e.target)) return;
|
||||||
|
|
||||||
longPress.current = false;
|
longPress.current = false;
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue