Fix iOS text field focus transfer across scenes#3203
Conversation
|
Could you help review this PR? cc Vladimir Mazunin (@mazunin-v-jb) |
|
Thank you for spotting the issue. Currently, we have onResignFocus handler that must prevent such cases. It seems like it does not handle all required cases, like youth. I would first try to reuse this approach instead of creating a new one to minimize duplicated logic. It would be great if you could modify the hasFocusedExternalInputViewInWindowHierarchy() to fix the problem. |
bd8b73f to
0746c67
Compare
Got it. And I have verified the previous dialog test case failure in the last CI pipeline is also fixed now. Could you help review and approval the CI again for me? Andrei Salavei (@ASalavei) |
0746c67 to
6de0aed
Compare
Vendula Švastalová (svastven)
left a comment
There was a problem hiding this comment.
LGTM. Thanks for this PR 👍🏻
|
Andrei Salavei (@ASalavei) Could you please approve and trigger the CI workflow again? I fixed the iPad-only failure in Local verification:
The two Web failures in the previous run were unrelated Thank you! |
|
The only remaining failure is It looks unrelated to this PR, since the changes are limited to I think we should retry it. Thanks |
|
The retried Compose Desktop Tests job failed again, but this time in a different test: Let's rerun the job once more. |
This fixes iOS
BasicTextFieldfocus handoff when moving focus between separate Compose scenes, for example an outerComposeUIViewControllerand a nestedComposeUIView.The fix adds a shared UIKit text input focus coordinator that releases the previously focused Compose scene before a different scene starts text input.
Fixes https://youtrack.jetbrains.com/issue/CMP-10454/iOS-BasicTextField-focus-is-not-released-when-moving-between-nested-ComposeUIView-scenes
Testing
NestedComposeTextFieldFocusTest.focusMovesToTextFieldInNestedComposeUIViewNested text field should take focus and release the outer text fieldExecuted 1 test, with 0 failuresRelease Notes
Fixes - iOS
BasicTextFieldfocus handoff between nested Compose iOS scenes.Google CLA
Signed or will sign the Google Contributor License Agreement.