8000 UI: Give autocomplete text field automatic focus on first page load by savathoon · Pull Request #284 · discord/access · GitHub
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content

UI: Give autocomplete text field automatic focus on first page load #284

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Jun 11, 2025

Conversation

savathoon
Copy link
Contributor

No description provided.

@Copilot Copilot AI review requested due to automatic review settings June 11, 2025 21:03
Copy link
@Copilot Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull Request Overview

This PR ensures the autocomplete text field receives focus automatically when the page first loads.

  • Added autoFocus prop to the TextField in TableTopBarAutocomplete
  • No other behavior changes
Comments suppressed due to low confidence (2)

src/components/TableTopBar.tsx:36

  • Add a unit or integration test to verify that the autocomplete input is focused on initial render, ensuring regressions are caught.
renderInput={(params) => <TextField {...params} label="Search" autoFocus />} 

src/components/TableTopBar.tsx:36

  • [nitpick] autoFocus can disrupt keyboard and screen reader users by moving focus unexpectedly. Consider adding an option to disable autofocus or ensure this behavior is properly documented and accessible.
renderInput={(params) => <TextField {...params} label="Search" autoFocus />} 

@savathoon savathoon merged commit d567ca8 into main Jun 11, 2025
6 checks passed
@savathoon savathoon deleted the autofocus branch June 11, 2025 21:38
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants
0