menu: Blocking mouse move event to back view, when PopupMenu has open. (#277)
Closes #275 https://github.com/user-attachments/assets/7061fd93-10dd-4645-8080-ec7dbb65a80e
This commit is contained in:
parent
709c706adf
commit
e1bf3556a9
1 changed files with 3 additions and 3 deletions
|
|
@ -3,8 +3,8 @@ use std::{cell::RefCell, rc::Rc};
|
||||||
use gpui::{
|
use gpui::{
|
||||||
anchored, deferred, div, prelude::FluentBuilder, px, relative, AnchorCorner, AnyElement,
|
anchored, deferred, div, prelude::FluentBuilder, px, relative, AnchorCorner, AnyElement,
|
||||||
AppContext, DismissEvent, DispatchPhase, Element, ElementId, Focusable, GlobalElementId,
|
AppContext, DismissEvent, DispatchPhase, Element, ElementId, Focusable, GlobalElementId,
|
||||||
IntoElement, MouseButton, MouseDownEvent, ParentElement, Pixels, Point, Position, Stateful,
|
InteractiveElement, IntoElement, MouseButton, MouseDownEvent, ParentElement, Pixels, Point,
|
||||||
Style, View, ViewContext, WindowContext,
|
Position, Stateful, Style, View, ViewContext, WindowContext,
|
||||||
};
|
};
|
||||||
|
|
||||||
use crate::popup_menu::PopupMenu;
|
use crate::popup_menu::PopupMenu;
|
||||||
|
|
@ -126,7 +126,7 @@ impl Element for ContextMenu {
|
||||||
// Focus the menu, so that can be handle the action.
|
// Focus the menu, so that can be handle the action.
|
||||||
menu.focus_handle(cx).focus(cx);
|
menu.focus_handle(cx).focus(cx);
|
||||||
|
|
||||||
this.child(div().child(menu.clone()))
|
this.child(div().occlude().child(menu.clone()))
|
||||||
}),
|
}),
|
||||||
)
|
)
|
||||||
.with_priority(1)
|
.with_priority(1)
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue