-
Notifications
You must be signed in to change notification settings - Fork 29.7k
Add Focus support for iOS platform view #103019
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 support for iOS platform view #103019
Conversation
0693de8 to
75b147b
Compare
jmagman
left a comment
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.
Some nits, @cyanglaz knows more about whether the actual focus logic is correct.
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.
Can you instead land this after the engine change?
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.
If we land engine first, there would be a similar problem when the engine sends "focusView" channel message that's not implemented in framework yet.
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.
Maybe split the PRs a little more so the landing orders would be:
- Framework receive method channel (it will be a non-op after landing it as the method channel will never be fired from engine)
- Engine implementation.
- Framework send method channel
This is a little more complicated but we can ensure there is no bad version or TODOs like this.
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.
@cyanglaz I think i can do that.
|
Also the ci.yaml failure is because you're branched off a commit from a few weeks ago, it's been fixed if you rebase to top of tree. |
75b147b to
d26d4d4
Compare
|
Friendly ping to take a look at this one @cyanglaz |
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.
Maybe split the PRs a little more so the landing orders would be:
- Framework receive method channel (it will be a non-op after landing it as the method channel will never be fired from engine)
- Engine implementation.
- Framework send method channel
This is a little more complicated but we can ensure there is no bad version or TODOs like this.
e425bbc to
f967e03
Compare
f967e03 to
bbcc055
Compare
bbcc055 to
c45eb67
Compare
|
@cyanglaz can you take another look? thx |
cyanglaz
left a comment
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
This reverts commit f852092.
This PR makes iOS platform view focusable.
Since frameworks and engines are separate repos, I have to try-and-catch the non-existing "viewFocused" channel message for now. Will remove the try-catch after we landed and rolled the engine update.
The main idea is that:
onFocusChangecallback savedonFocusChangesaved in the previous steponFocusChangewill then send a channel message "TextInput.setPlatformViewClient" to the engine, which should remove the focus on previously focused text inputs (e.g. EditableText)I am going through the Flutter Style Guide now (will check the box once I am done). But I tried my best to following existing conventions.
Related Issue
#34187
Pre-launch Checklist
I am going through the Flutter Style Guide now (will check the box once I am done). But I tried my best to following existing conventions.
///).If you need help, consider asking for advice on the #hackers-new channel on Discord.