[🐴] Don't submit the message on return press when on a phone (web input) (#4203)
move this to the `onKeyDown` prop Revert "do the same for tablets" This reverts commit 47c709e2734f2acf34f89dd5aca42a75a2b56270. do the same for tablets don't submit message if the device is a phone on web move `onTouchStart` to `browser.ts` globals
This commit is contained in:
parent
fa039e542d
commit
85782aeb93
4 changed files with 11 additions and 6 deletions
|
@ -11,6 +11,7 @@ import {sanitizeHandle} from '#/lib/strings/handles'
|
|||
import {useModerationOpts} from '#/state/preferences/moderation-opts'
|
||||
import {usePrefetchProfileQuery, useProfileQuery} from '#/state/queries/profile'
|
||||
import {useSession} from '#/state/session'
|
||||
import {isTouchDevice} from 'lib/browser'
|
||||
import {useProfileShadow} from 'state/cache/profile-shadow'
|
||||
import {formatCount} from '#/view/com/util/numeric/format'
|
||||
import {UserAvatar} from '#/view/com/util/UserAvatar'
|
||||
|
@ -43,8 +44,6 @@ const floatingMiddlewares = [
|
|||
}),
|
||||
]
|
||||
|
||||
const isTouchDevice = 'ontouchstart' in window || navigator.maxTouchPoints > 1
|
||||
|
||||
export function ProfileHoverCard(props: ProfileHoverCardProps) {
|
||||
if (props.disable || isTouchDevice) {
|
||||
return props.children
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue