From b510fece4c9c8f29bbcbb3d08da761fe6642bee0 Mon Sep 17 00:00:00 2001 From: Thinley <128626751+thinley4@users.noreply.github.com> Date: Sun, 17 Nov 2024 23:55:14 +0530 Subject: [PATCH] fix: resolve issue with right arrow keystroke functionality (#1568) --- src/components/VideoPlayer2.tsx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/components/VideoPlayer2.tsx b/src/components/VideoPlayer2.tsx index 71d6b56e0..6f72e8dd3 100644 --- a/src/components/VideoPlayer2.tsx +++ b/src/components/VideoPlayer2.tsx @@ -311,7 +311,7 @@ export const VideoPlayer: FunctionComponent = ({ player.playbackRate(1); } }; - document.addEventListener('keydown', handleKeyPress); + document.addEventListener('keydown', handleKeyPress, {capture: true}); document.addEventListener('keyup', handleKeyUp); // Cleanup function return () => {