chore: update deps
This commit is contained in:
@@ -145,7 +145,7 @@ impl AppMenu {
|
||||
})
|
||||
.with_menu_items(items, window, cx)
|
||||
});
|
||||
popup_menu.read(cx).focus_handle(cx).focus(window);
|
||||
popup_menu.read(cx).focus_handle(cx).focus(window, cx);
|
||||
self._subscription =
|
||||
Some(cx.subscribe_in(&popup_menu, window, Self::handle_dismiss));
|
||||
self.popup_menu = Some(popup_menu.clone());
|
||||
@@ -157,7 +157,7 @@ impl AppMenu {
|
||||
|
||||
let focus_handle = popup_menu.read(cx).focus_handle(cx);
|
||||
if !focus_handle.contains_focused(window, cx) {
|
||||
focus_handle.focus(window);
|
||||
focus_handle.focus(window, cx);
|
||||
}
|
||||
|
||||
popup_menu
|
||||
|
||||
@@ -156,7 +156,7 @@ impl Element for ContextMenu {
|
||||
.when_some(menu_view, |this, menu| {
|
||||
// Focus the menu, so that can be handle the action.
|
||||
if !menu.focus_handle(cx).contains_focused(window, cx) {
|
||||
menu.focus_handle(cx).focus(window);
|
||||
menu.focus_handle(cx).focus(window, cx);
|
||||
}
|
||||
|
||||
this.child(div().occlude().child(menu.clone()))
|
||||
|
||||
@@ -659,7 +659,7 @@ impl PopupMenu {
|
||||
cx: &mut Context<Self>,
|
||||
) {
|
||||
if let Some(context) = self.action_context.as_ref() {
|
||||
context.focus(window);
|
||||
context.focus(window, cx);
|
||||
}
|
||||
|
||||
window.dispatch_action(action.boxed_clone(), cx);
|
||||
@@ -759,7 +759,7 @@ impl PopupMenu {
|
||||
// Focus the submenu, so that can be handle the action.
|
||||
active_submenu.update(cx, |view, cx| {
|
||||
view.set_selected_index(0, cx);
|
||||
view.focus_handle.focus(window);
|
||||
view.focus_handle.focus(window, cx);
|
||||
});
|
||||
cx.notify();
|
||||
return true;
|
||||
@@ -790,7 +790,7 @@ impl PopupMenu {
|
||||
|
||||
self.selected_index = None;
|
||||
parent.update(cx, |view, cx| {
|
||||
view.focus_handle.focus(window);
|
||||
view.focus_handle.focus(window, cx);
|
||||
cx.notify();
|
||||
});
|
||||
}
|
||||
@@ -819,7 +819,7 @@ impl PopupMenu {
|
||||
|
||||
// Focus back to the previous focused handle.
|
||||
if let Some(action_context) = self.action_context.as_ref() {
|
||||
window.focus(action_context);
|
||||
window.focus(action_context, cx);
|
||||
}
|
||||
|
||||
let Some(parent_menu) = self.parent_menu.clone() else {
|
||||
|
||||
Reference in New Issue
Block a user