title: SwiftUI Keyboard Toolbar Scope
body: <p>Say we have the following view of two text fields:</p>
  <pre class="lang-swift prettyprint-override"><code>struct ContentView: View {
      
      @State private var first = &quot;&quot;
      @State private var second = &quot;&quot;
      
      var body: some View {
          VStack {
              TextField(&quot;First&quot;, text: $first)
                  .toolbar {
                      ToolbarItem(placement: .keyboard) {
                          Button(&quot;Test&quot;) { }
                      }
                  }
              
              TextField(&quot;Second&quot;, text: $second)
          }
      }
  }
  </code></pre>
  <p>The <code>toolbar</code> modifier is applied only to the &quot;first&quot; text field. My expectation is therefore that it only shows up on the keyboard, when the &quot;first&quot; text field is in focus.
  What happens in practice though, it that it also shows up when the &quot;second&quot; text field is in focus.</p>
  <p>Is this intended behaviour? And if so, how can I have different keyboard toolbars for different text fields?</p>