-
-
Notifications
You must be signed in to change notification settings - Fork 287
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
fix: Clicking outside the suggestion popup should close it #3754
fix: Clicking outside the suggestion popup should close it #3754
Conversation
Used on edit_new_packagings.dart and simple_input_page.dart
Codecov Report
@@ Coverage Diff @@
## develop #3754 +/- ##
===========================================
- Coverage 10.40% 10.40% -0.01%
===========================================
Files 272 272
Lines 13835 13846 +11
===========================================
Hits 1440 1440
- Misses 12395 12406 +11
📣 We’re building smart automated test selection to slash your CI/CD build times. Learn more |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hi @thomas-algo!
I'm not able to actually test your PR, and I'm worried about something: doesn't your Unfocus
widget capture all gestures, preventing other widgets below to capture taps?
For instance, I'm in an autocomplete text field: how can I click on the android app bar back button if the gesture is caught by Unfocus
?
That's a true question - actually I'm not very familiar with GestureDetector
.
I'm a bit surprised that you passed the "format" tests, as the following doesn't look great (@M123-dev, any opinion on that?)
child: UnfocusWhenTapOutside(
child: SmoothScaffold(
appBar: SmoothAppBar(
Please don't be shy with ,
, e.g. ),),
instead of )),
.
Hi ! |
I've just noticed that @Akashsri3bi was assigned this issue, therefore it's a bit problematic to give you control over this issue, unless you've already discussed the matter with @Akashsri3bi. Now, about your latest comment and commit.
Thank you!
That would work with
In that page we don't use autocompletes anyway, do we? |
I have contacted him on slack and I am waiting for a response.
Upon testing, it seems that the same principle applies to buttons and other: the child always has the priority.
UnfocusWhenTapOutside allows to dismiss the suggestions and the keyboard. |
@monsieurtanuki Please assign it to @thomas-algo I think his approach might work for the same! |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thank you @thomas-algo!
I guess my similar but different experience with a GestureDetector
with stronger priority involved a Stack
, and not a child
.
Thank you @Akashsri3bi for your fast answer about letting @thomas-algo deal with that issue. |
What
Videos
Old behavior (trying to tap outside the text field but the keyboard is not dismissed)
https://user-images.githubusercontent.com/105145857/222299278-9e6f8435-8489-43eb-8b1e-c02569656e10.mp4
New behavior
https://user-images.githubusercontent.com/105145857/222299843-cda9c3c3-b214-4145-869a-607773693f22.mp4
Fixes bug(s)