Skip to content

Commit

Permalink
Fix media query used to prevent enter sending DM on mobile web (#6669)
Browse files Browse the repository at this point in the history
  • Loading branch information
brw authored Nov 23, 2024
1 parent 9663b3e commit b892d8b
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/screens/Messages/components/MessageInput.web.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ export function MessageInput({
children?: React.ReactNode
openEmojiPicker?: (pos: EmojiPickerPosition) => void
}) {
const {isTabletOrDesktop} = useWebMediaQueries()
const {isMobile} = useWebMediaQueries()
const {_} = useLingui()
const t = useTheme()
const {getDraft, clearDraft} = useMessageDraft()
Expand Down Expand Up @@ -212,7 +212,7 @@ export function MessageInput({
onChange={onChange}
// On mobile web phones, we want to keep the same behavior as the native app. Do not submit the message
// in these cases.
onKeyDown={isTouchDevice && isTabletOrDesktop ? undefined : onKeyDown}
onKeyDown={isTouchDevice && isMobile ? undefined : onKeyDown}
/>
<Pressable
accessibilityRole="button"
Expand Down

0 comments on commit b892d8b

Please sign in to comment.