From becf2fd33d9eaf0570376bfa7bc0bcb7ed5cc379 Mon Sep 17 00:00:00 2001 From: Kamil Owczarz Date: Wed, 21 Feb 2024 18:01:50 +0100 Subject: [PATCH 1/2] Fix app returns to previous thread when scrubbing video in thread --- src/components/VideoPlayer/BaseVideoPlayer.js | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/src/components/VideoPlayer/BaseVideoPlayer.js b/src/components/VideoPlayer/BaseVideoPlayer.js index 73dbf8407c0c..da4306f2164a 100644 --- a/src/components/VideoPlayer/BaseVideoPlayer.js +++ b/src/components/VideoPlayer/BaseVideoPlayer.js @@ -164,7 +164,9 @@ function BaseVideoPlayer({ }, [bindFunctions, currentVideoPlayerRef, currentlyPlayingURL, isSmallScreenWidth, originalParent, sharedElement, shouldUseSharedVideoElement, url]); return ( - <> + // We need to wrap the video component in a component that will catch unhandled pointer events. Otherwise, these + // events will bubble up the tree, and it will cause unexpected press behavior. + {(isHovered) => ( @@ -243,7 +245,7 @@ function BaseVideoPlayer({ hidePopover={hidePopoverMenu} anchorPosition={popoverAnchorPosition} /> - + ); } From dbc8c1bb4a0e21024dde3056da044c519789a0ca Mon Sep 17 00:00:00 2001 From: Kamil Owczarz Date: Thu, 22 Feb 2024 17:13:59 +0100 Subject: [PATCH 2/2] Fix styles --- src/components/VideoPlayer/BaseVideoPlayer.js | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/components/VideoPlayer/BaseVideoPlayer.js b/src/components/VideoPlayer/BaseVideoPlayer.js index da4306f2164a..44317a02c396 100644 --- a/src/components/VideoPlayer/BaseVideoPlayer.js +++ b/src/components/VideoPlayer/BaseVideoPlayer.js @@ -166,7 +166,10 @@ function BaseVideoPlayer({ return ( // We need to wrap the video component in a component that will catch unhandled pointer events. Otherwise, these // events will bubble up the tree, and it will cause unexpected press behavior. - + {(isHovered) => (