我有一个文本字段,当它失去焦点时应该隐藏起来。我还有一个按钮。问题是,当您单击按钮时,文本字段首先失去焦点,这会移动按钮,阻止它接收单击事件。HTML: <p> Focus on the text field, and then click the button </p>
<input type="text"
当我按“返回”或单击“外部Textfield”时,如何删除Textfield焦点?注意,这里是SwiftUI on MacOS。State var field1: String = "This is the Text Field View"
VStack{ print("Button Pressed")
TextField(&quo