mirror of
https://github.com/Stremio/stremio-web.git
synced 2026-04-05 20:59:49 +00:00
fix: prevent hold-to-speed-up when menus or popups are open
Closes Stremio/stremio-bugs#2440 Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This commit is contained in:
parent
7ab75cfc88
commit
003ea9f2dc
1 changed files with 2 additions and 0 deletions
|
|
@ -767,6 +767,7 @@ const Player = ({ urlParams, queryParams }) => {
|
|||
React.useLayoutEffect(() => {
|
||||
const onKeyDown = (e) => {
|
||||
if (e.code !== 'Space' || e.repeat) return;
|
||||
if (menusOpen || nextVideoPopupOpen) return;
|
||||
|
||||
longPress.current = false;
|
||||
|
||||
|
|
@ -804,6 +805,7 @@ const Player = ({ urlParams, queryParams }) => {
|
|||
|
||||
const onMouseDownHold = (e) => {
|
||||
if (e.button !== 0) return; // left mouse button only
|
||||
if (menusOpen || nextVideoPopupOpen) return;
|
||||
if (controlBarRef.current && controlBarRef.current.contains(e.target)) return;
|
||||
|
||||
longPress.current = false;
|
||||
|
|
|
|||
Loading…
Reference in a new issue