diff --git a/packages/pl-fe/src/modals/media-modal.tsx b/packages/pl-fe/src/modals/media-modal.tsx index e014f4dea..44d28ddc5 100644 --- a/packages/pl-fe/src/modals/media-modal.tsx +++ b/packages/pl-fe/src/modals/media-modal.tsx @@ -127,12 +127,22 @@ const MediaModal: React.FC = (props) => { }; const bind = useDrag( - ({ active, movement: [mx], direction: [xDir], cancel }) => { + ({ active, movement: [mx], direction: [xDir], cancel, event }) => { // Disable swipe when zoomed in. if (zoomedIn) { return; } + // Disable swipe when interacting with video/audio controls or other interactive elements + const target = event?.target as HTMLElement | null; + if (target) { + const interactiveParent = target.closest('.video-player__controls'); + if (interactiveParent) { + cancel(); + return; + } + } + // If dragging and swipe distance is enough, change the index. if ( active &&