cheeaun / cheeaun/phanpy

Search field retains focus even when it's not shown

Open
#460 2 comments 0 reactions 0 assignees View on GitHub
bug unable to reproduce
Dominant language
JavaScript
Stars
1.5k
Forks
186
Avg merge
1d 36m
Merged PRs (30d)
11

Description

**Describe the bug**
Searching then going back to the front page of Phanpy retains focus in the search box even though it's not shown

**To Reproduce**
Steps to reproduce the behavior:
1. Open search box by pressing /
2. Do a search
3. Go back to the front page by pressing the back button in the browser or with a keyboard shortcut or mouse button
4. Try using any of Phanpys keyboard shortcuts, like the / again
5. Notice nothing seems to happen
6. Click anywhere on Phanpy
7. Open search with / again
8. Notice that whatever you tried to do in step 4 is now typed into the search box

**Expected behavior**
You should not have to use the mouse to get Phanpy back to normal behavior, everything should just work as normal

**Desktop (please complete the following information):**
- OS: Linux, Nobara 39
- Browser Firefox
- Version 123

**Additional context**
Thank you for your work!

Contributor guide

No contributing guide indexed for this repository

Research direction

Reproduce the search-and-back navigation sequence in Firefox, then inspect the search field's focus behavior when returning to the front page. Confirm the fix by ensuring keyboard shortcuts work immediately after navigation and that typing does not appear in the hidden search field.

Written by the indexing model from the issue text.

Assessment

Tech stack
javascript
Domain
frontend, web-dev
Issue type
Bug
Difficulty
2/5
Estimated time
1-3 hours
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
45/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.