-
Notifications
You must be signed in to change notification settings - Fork 6k
[iOS] Send connectionClosed message when resignFirstResponder to ensure framework focus state is correct. #40703
Changes from 3 commits
6cc3ba7
dbec70c
9472b6b
fcf40ed
0f877f4
1725876
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -1043,7 +1043,8 @@ - (BOOL)canBecomeFirstResponder { | |
- (BOOL)resignFirstResponder { | ||
BOOL success = [super resignFirstResponder]; | ||
if (success) { | ||
[self.textInputDelegate flutterTextInputViewDidResignFirstResponder:self]; | ||
[self.textInputDelegate flutterTextInputViewDidResignFirstResponder:self | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. nit: Looks like this one will be called when either the Flutter framework or UIKit tells the input view to give up its first responder status. It seems redundant for the former since there's no need to inform the Flutter framework when it is the one that initiated the focus change. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Yes. When framework close the keyboard first, this will send a msg to framework but will be handled And only when platform starts to unfocus, the Currently, engine side doens't have a good simple way to know the original focus/unfocus signal is from framework or from platform, this maybe can be done by set some var like So I think this cost can be acceptable? ^_^ There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Yeah that makes sense the old connection is already torn down by the framework so messages associated with the old client id will be thrown away. |
||
client:_textInputClient]; | ||
} | ||
return success; | ||
} | ||
|
Uh oh!
There was an error while loading. Please reload this page.