Skip to content

Commit

Permalink
Merge pull request #37036 from software-mansion-labs/video-player-fol…
Browse files Browse the repository at this point in the history
…lowups/app-returns-to-previous-thread-when-pressed-on-video

Fix app returns to previous thread when scrubbing video in thread

(cherry picked from commit c71387c)
  • Loading branch information
iwiznia authored and OSBotify committed Feb 23, 2024
1 parent 3091b52 commit 70e2051
Showing 1 changed file with 7 additions and 2 deletions.
9 changes: 7 additions & 2 deletions src/components/VideoPlayer/BaseVideoPlayer.js
Original file line number Diff line number Diff line change
Expand Up @@ -168,7 +168,12 @@ 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.
<PressableWithoutFeedback
accessibilityRole="button"
style={styles.flex1}
>
<View style={style}>
<Hoverable>
{(isHovered) => (
Expand Down Expand Up @@ -247,7 +252,7 @@ function BaseVideoPlayer({
hidePopover={hidePopoverMenu}
anchorPosition={popoverAnchorPosition}
/>
</>
</PressableWithoutFeedback>
);
}

Expand Down

0 comments on commit 70e2051

Please sign in to comment.