mirror of
https://github.com/cinnyapp/cinny.git
synced 2025-09-13 14:22:25 +03:00
Fix focus behaviour when opening single-purpose features (#2349)
* Improve focus behaviour on search boxes and chats * Implemented MR #2317 * Fix crash if canMessage is false * Prepare for PR #2335 * disable autofocus on message field
This commit is contained in:
parent
461e730c34
commit
77ab37f637
2 changed files with 2 additions and 1 deletions
|
@ -29,6 +29,7 @@ export function SearchInput({ active, loading, searchInputRef, onSearch, onReset
|
||||||
ref={searchInputRef}
|
ref={searchInputRef}
|
||||||
style={{ paddingRight: config.space.S300 }}
|
style={{ paddingRight: config.space.S300 }}
|
||||||
name="searchInput"
|
name="searchInput"
|
||||||
|
autoFocus
|
||||||
size="500"
|
size="500"
|
||||||
variant="Background"
|
variant="Background"
|
||||||
placeholder="Search for keyword"
|
placeholder="Search for keyword"
|
||||||
|
|
|
@ -273,7 +273,7 @@ function InviteUser({ isOpen, roomId, searchTerm, onRequestClose }) {
|
||||||
searchUser(usernameRef.current.value);
|
searchUser(usernameRef.current.value);
|
||||||
}}
|
}}
|
||||||
>
|
>
|
||||||
<Input value={searchTerm} forwardRef={usernameRef} label="Name or userId" />
|
<Input value={searchTerm} forwardRef={usernameRef} label="Name or userId" autoFocus />
|
||||||
<Button disabled={isSearching} iconSrc={UserIC} variant="primary" type="submit">
|
<Button disabled={isSearching} iconSrc={UserIC} variant="primary" type="submit">
|
||||||
Search
|
Search
|
||||||
</Button>
|
</Button>
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue