Fix panel drag leaking through overlay (#10035)

Closes #10017. While reworking the `overlay` element in #9911, I did not
realize that all overlay elements called `defer_draw` with a priority of
`1`.

/cc @as-cii 

Not including release notes, since it was only present in nightly.

Release Notes:

- N/A
This commit is contained in:
Bennet Bo Fenner 2024-04-01 12:31:19 +02:00 committed by GitHub
parent 5602593089
commit c126fdb616
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
9 changed files with 33 additions and 16 deletions

View file

@ -1562,16 +1562,14 @@ impl Pane {
}
fn render_menu_overlay(menu: &View<ContextMenu>) -> Div {
div()
.absolute()
.bottom_0()
.right_0()
.size_0()
.child(deferred(
div().absolute().bottom_0().right_0().size_0().child(
deferred(
anchored()
.anchor(AnchorCorner::TopRight)
.child(menu.clone()),
))
)
.with_priority(1),
)
}
pub fn set_zoomed(&mut self, zoomed: bool, cx: &mut ViewContext<Self>) {