Switch from using the key window to the main window mac platform API
When the help menu is open, the help menu's search field is the key window, and this was causing menu item action resolution to fail co-authored-by: Max <max@zed.dev>
This commit is contained in:
parent
9398de6a57
commit
adf94a1681
6 changed files with 12 additions and 12 deletions
|
@ -1294,7 +1294,7 @@ impl MutableAppContext {
|
|||
|
||||
pub fn is_action_available(&self, action: &dyn Action) -> bool {
|
||||
let action_type = action.as_any().type_id();
|
||||
if let Some(window_id) = self.cx.platform.key_window_id() {
|
||||
if let Some(window_id) = self.cx.platform.main_window_id() {
|
||||
if let Some(focused_view_id) = self.focused_view_id(window_id) {
|
||||
for view_id in self.ancestors(window_id, focused_view_id) {
|
||||
if let Some(view) = self.views.get(&(window_id, view_id)) {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue