-
Notifications
You must be signed in to change notification settings - Fork 29.7k
Description
Description
In trying to land #142942, the iOS platform view test failed, so it was reverted.
Jen (@jmagman ), Yegor (@yjbanov) and I have tried debugging this and reached this level of understanding of the bug.
Jen explained in this comment the details we've discovered so far: #149741 (comment)
I've reached the limit in the amount of time I can devote to this, so I'm going to just prevent setting the callback on iOS (where it isn't expected to do anything anyhow), and submit it for other platforms, and we can debug it at our leisure.
The behavior is definitely very odd: Setting the onFocus callback for the Semantics node in the Focus widget in the framework causes the native iOS text field in the platform view UI integration test to shift left by 93 pixels so that it's lower left corner is outside of the bounding box for the platform view, consequently making it not possible to scroll it into view when the test tries to tap on it. If the callback isn't set, it doesn't move the text field. I'm going to mention again that it's not a Flutter text field, it's the native iOS text field inside the platform view that is shifting position, just for emphasis.
In no way does this make sense to me, and it should be debugged to find out the root cause, since I suspect it is a deeper bug lurking in the iOS engine, but since iOS isn't expected to send focus events separate from accessibility focus events, the callback wouldn't ever get called anyhow.
For now, I'm filing this issue and attaching it to a TODO in the code.