so by adding .focusable() on the corresponding view.. a "click" on that view is fine enough...
still it would be nice if a "window" became focused by clicking on it's tab or window bar.. cause eventually this is what you are doing: activating (focusing) that window
mean time I figured out how to "modify" the menu with modifiers
CommandMenu("Message") {
if var message = message {
Button("Send \(message.text)") {
message.send()
}
.disabled(message.text.isEmpty ?? true)
.modifierKeyAlternate(.shift) {
Button("Send (Shift)") {
message.text += " shift pressed"
message.send()
}
.disabled(message.text.isEmpty ?? true)
}
}
}
Topic:
Community
SubTopic:
Apple Developers