spotube
spotube copied to clipboard
fix: dismiss keyboard on tap in search page (iOS)
Summary
Fix the issue where iPhone users cannot dismiss the keyboard after searching.
Problem
- iPad has a dismiss button at the bottom of the keyboard, but iPhone does not
- Users had to tap the three dots (⋯) menu on a song to dismiss the keyboard
Solution
- Wrap search results area with
GestureDetector - Use
HitTestBehavior.translucentto detect taps on empty space - Call
FocusScope.of(context).unfocus()on tap to dismiss keyboard
Changes
lib/pages/search/search.dart: Wrap search results area withGestureDetectorto dismiss keyboard on tap
Test plan
- [ ] Open search page on iPhone
- [ ] Type search query
- [ ] Tap on search results area or empty space
- [ ] Verify keyboard dismisses
- [ ] Verify tapping search result items still works correctly
Hello, just checking in on this PR. I understand you might be busy, but I’d appreciate it if you could take a look when you have a moment. I'm happy to resolve any conflicts or make changes if needed.
I understand you must be busy, but I would highly appreciate it if you could spare some time to review this PR. As a part of a university course assignment, feedback or a merge is crucial for my submission deadline.
Please let me know if there are any issues I need to resolve, or if you have specific feedback on the code. Thank you for your time!