diff --git a/src/components/forms/TextField.tsx b/src/components/forms/TextField.tsx index 99d5e715..ebf2e475 100644 --- a/src/components/forms/TextField.tsx +++ b/src/components/forms/TextField.tsx @@ -5,13 +5,11 @@ import { TextInputProps, TextStyle, ViewStyle, - Pressable, StyleSheet, AccessibilityProps, } from 'react-native' import {HITSLOP_20} from 'lib/constants' -import {isWeb} from '#/platform/detection' import {useTheme, atoms as a, web, tokens, android} from '#/alf' import {Text} from '#/components/Typography' import {useInteractionState} from '#/components/hooks/useInteractionState' @@ -41,7 +39,6 @@ export type RootProps = React.PropsWithChildren<{isInvalid?: boolean}> export function Root({children, isInvalid = false}: RootProps) { const inputRef = React.useRef(null) - const rootRef = React.useRef(null) const { state: hovered, onIn: onHoverIn, @@ -72,35 +69,17 @@ export function Root({children, isInvalid = false}: RootProps) { ], ) - React.useLayoutEffect(() => { - const root = rootRef.current - if (!root || !isWeb) return - // @ts-ignore web only - root.tabIndex = -1 - }, []) - return ( - inputRef.current?.focus()} - onHoverIn={onHoverIn} - onHoverOut={onHoverOut}> + inputRef.current?.focus(), + onMouseOver: onHoverIn, + onMouseOut: onHoverOut, + })}> {children} - + ) } @@ -187,7 +166,6 @@ export function createInput(Component: typeof TextInput) { @@ -313,7 +294,6 @@ export function Suffix({ const ctx = React.useContext(Context) return (