Skip to content

Commit

Permalink
feat: autofocus input in new rooms
Browse files Browse the repository at this point in the history
  • Loading branch information
iyzana committed Feb 19, 2023
1 parent 24bf04c commit b149fd7
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions frontend/src/component/Input.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -24,9 +24,13 @@ function Input({ addToQueue, working }: InputProps) {
}
};

// autofocus input in new rooms
const autoFocus = window.location.pathname === '/';

return (
<div className="input-group">
<input
autoFocus={autoFocus}
className="input-text"
type="text"
placeholder="Video URL or YouTube search query"
Expand Down

0 comments on commit b149fd7

Please sign in to comment.