Skip to content

Conversation

AshmitSherigar
Copy link
Contributor

What I Fixed

  • Fixed a focus issue in the search input field.
  • After submitting a search the clear button (x mark) now gets focus.
  • After clearing the search the input field is automatically focused again.
  • This improves keyboard accessibility and user flow.

How to Test

  1. Go to /Search/
  2. Go to the search bar and type something valid --> Press Enter.
  3. After results show, check if the button is focused.
  4. Click to clear --> Input field should automatically regain focus.
  5. Focus behavior should feel smooth and predictable throughout.

Files Changed

  • components/SearchResults.tsx

Let me know if there is any update for me to do

Closes #914

@AshmitSherigar
Copy link
Contributor Author

@ksen0 you can check this PR

@ksen0
Copy link
Member

ksen0 commented Sep 18, 2025

Hi @AshmitSherigar thank you for your work on this! I just tested this PR manually, and I found that in the test protocol, points 4 and 5 do not work for me.

After clearing, the clear button is in focus; the input field does not regain focus.

After clearning, the text input is not really cleared. The text "Search" is there, but then when I start typing the previous string appears again.

As I wrote before, please don't include unnecessary changes in the PR: for example, a big chunk of code is only moved but unchanged. This makes code history harder to navigate in the future. Please update your PR to be minimal and focused only on the issue, as well as addressing the above issues.

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.

[focus] Focus is lost after clicking “Submit search” button
2 participants