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:
Timothy Z. 2026-03-27 15:31:52 +02:00 committed by GitHub
commit ebc7c5bdde
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -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;