Popover (or sheet) is not working when Menu, Picker, etc is displayed.
struct ContentView: View {
@State private var showPopover = false
| import SwiftUI | |
| struct ContentView: View { | |
| @State private var query = "" | |
| var body: some View { | |
| TextField( | |
| "Input text", | |
| text: $query | |
| ) |
| -- ref | |
| -- - https://github.com/wojteklu/xcode-open-on-github | |
| -- - http://tonbi.jp/AppleScript/Tips/Scripting/Debug.html | |
| -- - https://developer.apple.com/library/archive/documentation/LanguagesUtilities/Conceptual/MacAutomationScriptingGuide/CallCommandLineUtilities.html | |
| on run {input, parameters} | |
| tell application "Xcode-14.0.0" | |
| set activeDocument to document 1 whose name ends with (word -1 of (get name of window 1)) | |
| set activeDocumentPath to path of activeDocument | |
| set currentLines to selected paragraph range of activeDocument | |
| set startLine to get item 1 of currentLines |