Skip to content

Commit

Permalink
fix: long press video toggles text selection
Browse files Browse the repository at this point in the history
  • Loading branch information
tienifr committed Feb 20, 2024
1 parent cd6b1a8 commit 84fc9c2
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions src/components/VideoPlayerPreview/VideoPlayerThumbnail.js
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,8 @@ import Image from '@components/Image';
import PressableWithoutFeedback from '@components/Pressable/PressableWithoutFeedback';
import {ShowContextMenuContext, showContextMenuForReport} from '@components/ShowContextMenuContext';
import useThemeStyles from '@hooks/useThemeStyles';
import ControlSelection from '@libs/ControlSelection';
import * as DeviceCapabilities from '@libs/DeviceCapabilities';
import * as ReportUtils from '@libs/ReportUtils';
import variables from '@styles/variables';
import CONST from '@src/CONST';
Expand Down Expand Up @@ -44,6 +46,8 @@ function VideoPlayerThumbnail({thumbnailUrl, onPress, accessibilityLabel}) {
accessibilityLabel={accessibilityLabel}
accessibilityRole={CONST.ACCESSIBILITY_ROLE.BUTTON}
onPress={onPress}
onPressIn={() => DeviceCapabilities.canUseTouchScreen() && ControlSelection.block()}
onPressOut={() => ControlSelection.unblock()}
onLongPress={(event) =>
showContextMenuForReport(event, anchor, (report && report.reportID) || '', action, checkIfContextMenuActive, ReportUtils.isArchivedRoom(report))
}
Expand Down

0 comments on commit 84fc9c2

Please sign in to comment.