First Responder Being Lost During Layout Transitions
So I've got kinda a complicated situation, but long story short, anytime I focus one of my editable text nodes and then do an animated layout transition the first responder is lost.
My current use case is using ASEditableTextNode as a text field for input. Tapping the text field will bring the keyboard up, and then I wanted to use a layout transition to transition the text field and other elements upwards when the keyboard shows. I do this by responding to the UIKit keyboard appearance notifications and begin a layout transition when they occur. As soon as I invoke the transitionLayout method, the first responder is somehow nullified (the app no longer has a first responder, but resignFirstResponder is never called and the keyboard stays up). This gets really broken in cases where tapping out of the text field are wired up to call resignFirstResponder but since the text field isn't the first responder (nothing is) it doesn't work.
I imagine it's something to do with automatic subnode management or something, the first responder probably isn't being restored. Any ideas what's up?
I'm noticing that it's being removed from the view hierarchy and then readded in the same frame, which appears to be why the first responder is being lost. Ideally the layout transition wouldn't remove views that don't need to be removed, and would just adjust their frames. Is there any chance this could be implemented?
If I call becomeFirstResponder immediately after transitionLayout it works as expected
I'm getting this issue too, however calling becomeFirstResponder after transitionLayout isn't a perfect solution as in the case of email and passwords, iOS often brings up the "Save password" dialogue when it looses first responder (if editing a field after filling out an email e.g. to correct a typo) and then you get into a neverending loop of the user pressing "not now", it trying to re-focus on the ASEditableTextField, then the transition triggering the removal of it from the hierarchy, then it re-triggers the password save prompt.
So an alternate / cleaner solution would be really useful...
Just following up - this still is causing issues.