title: TextField onCommit is never called
body: <p>I have been working with SwiftUI for a week now, and as everyone, I am struggling to identify if something that doesn't work is either a bug or a misunderstanding on my part.</p>
  
  <p>I am using the TextField view but the <strong>onCommit</strong> closure is never executed. The <strong>onEditingChanged</strong> works fine. It gets called with true when the text field gains focus, and it gets called with false when it looses it.</p>
  
  <p>The <strong>onCommit</strong> closure, however, will never execute. According to the little documentation that is available in the code:</p>
  
  <blockquote>
    <p><strong>onCommit</strong>: The action to perform when the user performs an action
    (usually the return key) while the <code>TextField</code> has focus.</p>
  </blockquote>
  
  <p>This is the code:</p>
  
  <pre class="lang-swift prettyprint-override"><code>TextField($value,
            placeholder: Text(placeholder),
            onEditingChanged: { edit in
              print("edit = \(edit)")
            },
            onCommit: {
              print("COMITTED!")
            }).textFieldStyle(.roundedBorder).padding(.horizontal, 20)
  </code></pre>
  
  <p>Ideally, I would like to move the focus from the text field receiving the RETURN key and put the focus on the following field. It's easy with UITextField and the resignFirstResponder() and becomeFirstResponder().</p>
  
  <p>I already managed to use the <code>UIViewRepresentable</code> to embed an old UITextField, but that's not the point of this post. I would really hope to make it work in pure SwiftUI code.</p>
  
  <p>If I can ever get the onCommit to work, what should I put there to achieve my goal?</p>
  
  <p><strong>Update</strong>: It seems the problem is only present with iOS, not macOS where it seems to work fine.</p>
  
  <p><strong>Update 2</strong>: This is a video of the result of running the suggested code on my machine. I did file a bug with Apple... we'll see.</p>
  
  <p><a href="https://i.stack.imgur.com/pJQMa.gif" rel="noreferrer"><img src="https://i.stack.imgur.com/pJQMa.gif" alt="enter image description here"></a></p>