-
Notifications
You must be signed in to change notification settings - Fork 28.2k
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
Add focus check to onTapUpOutside #162939
base: master
Are you sure you want to change the base?
Conversation
}); | ||
|
||
// Regression test for https://github.com/flutter/flutter/issues/162573 | ||
testWidgets('onTapUpOutside is not called upon tap up outside when field is not focused', ( |
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.
The equivalent test for onTapOutside
is located in text_form_field_test.dart#L741, but in my opinion it should have been located in this file instead. That's why I added this test here. Let me know if I should move it to text_form_field_test.dart
instead.
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.
I think this test is good in editable_text_test.dart
. If you'd like you can also transfer the equivalent onTapOutside
test from text_form_field_test.dart
to editable_text_test.dart
, I think it fits better in here.
6d4690b
to
4588187
Compare
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.
LGTM, thank you for the contribution!
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.
LGTM!
@Renzo-Olivares I added a |
@Hannnes1 FYI there are some test failures now. |
Thanks. |
I think I'm gonna need some help with this one. I can't figure out why these tests fail |
Looks like the semantics tree doesn't match any more. I see the flags |
I know there have been a lot of semantic changes recently, maybe rebasing to master will fix some of these? |
Moved one test that should have been in editable_text_test. Also added one test to make sure I didn't break onTapOutside.
Rebasing again worked. Thanks! |
Adds a focus check to
onTapUpOutside
ofEditableText
, so that it doesn't trigger if theEditableText
doesn't have focus.onTapOutside
already had this check, but it was missed whenonTapUpOutside
was added.Fixes #162573
Pre-launch Checklist
///
).