Skip to content
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

Search input field never gets unfocused, keeps bringing up keyboard #1110

Closed
fmbarina opened this issue Feb 2, 2024 · 2 comments
Closed
Assignees
Labels
bug Something isn't working fixed in upcoming release Indicates that an issue has been fixed, and will be released in the next version
Milestone

Comments

@fmbarina
Copy link

fmbarina commented Feb 2, 2024

Description
Search text input field doesn't get automatically unfocused and keeps bringing up keyboard in other screens. So far, pressing enter on the search field is the only way I've found to fix this behavior without needing to close and reopen the app. It's easy to forget to do that when search results appear as you type, though.

How to Reproduce
Steps to reproduce the behavior:

  1. Go to the search tab
  2. Focus the text input field, but don't press enter
  3. Go to any other screen and start interacting with it
  • Open and then close community, upon returning, keyboard pops up
  • Press post thumbnail to open image, upon closing it, keyboard pops up
  • Select settings category (e.g. 'Gestures'), upon returning, keyboard pops up
  • Change accounts by long pressing the button on the navbar, keyboard pops up
  • Open sidebar, then close it, keyboards pops up

Expected Behavior
The search field shouldn't bring up the keyboard when you're not on the search screen. It should probably be unfocused when the user goes to another screen or interacts with any search results.

Device & App Version:

  • Device: Asus Zenfone 3 Zoom
  • OS: Android 8
  • App Version 0.2.8

Additional Context

Random idea from someone trying to learn Flutter: maybe unfocusing the search field at onDestinationSelected in bottom_nav_bar.dart could help? No need to answer, and I defer to your experience. Might try it later.

May have found another bug while testing this, unsure if related.

Note that even while browsing search results, the keyboard is brought up every time you return to them. Specifically when searching posts, however, tapping a thumbnail while the keyboard is still open erases the search field and clears all results.

@fmbarina fmbarina added the bug Something isn't working label Feb 2, 2024
@fmbarina fmbarina changed the title Search input field never gets unfocused, brings up keyboard when it shouldn't Search input field never gets unfocused, keeps bringing up keyboard Feb 2, 2024
@hjiangsu
Copy link
Member

hjiangsu commented Feb 5, 2024

Thanks for the detailed report!

maybe unfocusing the search field at onDestinationSelected in bottom_nav_bar.dart could help?

If you'd like to give it a try, by all means go ahead! I think thats a reasonable approach to solving this issue.

@hjiangsu hjiangsu self-assigned this Feb 7, 2025
@hjiangsu hjiangsu added the in-progress Indicates that an issue is currently being worked on label Feb 7, 2025
@hjiangsu hjiangsu added this to the 0.6.1 milestone Feb 7, 2025
@hjiangsu
Copy link
Member

hjiangsu commented Feb 7, 2025

As mentioned in #1686 (comment), I'll keep this issue up until all other Search related issues are fixed!

@hjiangsu hjiangsu added fixed in upcoming release Indicates that an issue has been fixed, and will be released in the next version and removed in-progress Indicates that an issue is currently being worked on labels Feb 13, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working fixed in upcoming release Indicates that an issue has been fixed, and will be released in the next version
Projects
None yet
Development

No branches or pull requests

2 participants