diff --git a/shared/chat/inbox/filter-row.tsx b/shared/chat/inbox/filter-row.tsx index 8a5651be6445..edb820dd9ca0 100644 --- a/shared/chat/inbox/filter-row.tsx +++ b/shared/chat/inbox/filter-row.tsx @@ -75,6 +75,7 @@ const ConversationFilterInput = React.memo(function ConversationFilterInput(ownP appendNewChatBuilder() }, [appendNewChatBuilder]) Kb.useHotKey('mod+n', onHotKeys) + Kb.useHotKey('mod+k', onStartSearch) React.useEffect(() => { if (isSearching) { @@ -82,28 +83,31 @@ const ConversationFilterInput = React.memo(function ConversationFilterInput(ownP } }, [isSearching]) - const searchInput = ( + const searchInput = isSearching ? ( + ) : ( + + + + + {Kb.Styles.isMobile ? 'Search' : `Search (\u2318K)`} + + + ) return ( void onKeyUp?: (event: React.KeyboardEvent) => void spellCheck?: boolean - tabIndex?: number // desktop only // Mobile only children?: React.ReactNode allowFontScaling?: boolean diff --git a/shared/common-adapters/plain-input.desktop.tsx b/shared/common-adapters/plain-input.desktop.tsx index 2ee05c107220..acbffba61cbc 100644 --- a/shared/common-adapters/plain-input.desktop.tsx +++ b/shared/common-adapters/plain-input.desktop.tsx @@ -40,7 +40,7 @@ const PlainInput = React.memo( const {growAndScroll, multiline, onFocus: _onFocus, selectTextOnFocus, onChangeText} = p const {maxBytes, globalCaptureKeypress, onBlur, onClick, style, resize, maxLength} = p const {rowsMin, rowsMax, textType, padding, flexable = true, type} = p - const {autoFocus, allowKeyboardEvents, placeholder, spellCheck, disabled, value, className, tabIndex} = p + const {autoFocus, allowKeyboardEvents, placeholder, spellCheck, disabled, value, className} = p const inputRef = React.useRef(null) const isComposingIMERef = React.useRef(false) const mountedRef = React.useRef(true) @@ -216,7 +216,6 @@ const PlainInput = React.memo( placeholder, ref: inputRef, spellCheck, - tabIndex, value, ...(maxLength ? {maxLength} : {}), ...(disabled ? {readOnly: true} : {}), diff --git a/shared/common-adapters/search-filter.tsx b/shared/common-adapters/search-filter.tsx index 44ba9eeebb52..0590aedf9182 100644 --- a/shared/common-adapters/search-filter.tsx +++ b/shared/common-adapters/search-filter.tsx @@ -57,7 +57,6 @@ type Props = { onKeyDown?: (event: React.KeyboardEvent) => void onKeyUp?: (event: React.KeyboardEvent) => void onKeyPress?: (event: NativeSyntheticEvent<{key: string}>) => void - tabIndex?: number // desktop only measureRef?: React.RefObject } @@ -202,7 +201,6 @@ const SearchFilter = React.forwardRef(function SearchFil onKeyUp={props.onKeyUp} onKeyPress={props.onKeyPress} onEnterKeyDown={props.onEnterKeyDown} - tabIndex={props.tabIndex} ref={inputRef} hideBorder={true} containerStyle={styles.inputContainer}