You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Keywords: menubar menu bar extra statusitem status item nsstatusitem close toggle present presentation popup popover
Description
When using MenuBarExtra on macOS Ventura, there is no way to programmatically hide, show, or toggle the presentation of the menu/window attached to the status item.
Especially in the case of applying the setting .menuBarExtraStyle(.window) there is no way for a control inside that window to dismiss the window.
Expectation
Potentially, we need a isPresented: Binding<Bool> on MenuBarExtra that can allow this. Or some other method that can be propagated into subviews.
Workaround
After many hours of persistence I have found a hacky workaround. But we definitely need a 1st-party native solution.
Description
When using
MenuBarExtra
on macOS Ventura, there is no way to programmatically hide, show, or toggle the presentation of the menu/window attached to the status item.Especially in the case of applying the setting
.menuBarExtraStyle(.window)
there is no way for a control inside that window to dismiss the window.Expectation
Potentially, we need a
isPresented: Binding<Bool>
onMenuBarExtra
that can allow this. Or some other method that can be propagated into subviews.Workaround
After many hours of persistence I have found a hacky workaround. But we definitely need a 1st-party native solution.
https://gist.github.com/orchetect/4530f1fffd74ed91bfd832e74e172652
The text was updated successfully, but these errors were encountered: