onCommit on TextField is never called

The documentation says that `onCommit` is "The action to perform when the user performs an action (usually the return key) while the TextField has focus". This worked well in the beta 1 of Xcode 11, but in the beta 2 this seems broken, and `onCommit` is never called.


Am I missing something? In the meanwhile I've sent a feedback (FB6168738).

Replies

I'm hitting this too. It was working in beta 1, but not beta 2. I'm only testing with the simulator right now.

I think this is a bug as well, but haven't submitted a radar yet. While experimenting with beta 2 I'm using John Susek's workaround of implementing onEditingChanged in the TextField constructor and checking for a "false" argument (meaning editing isn't currently taking place) as a location to handle the normal onCommit activities.