mirror of
https://github.com/zed-industries/zed.git
synced 2025-01-09 10:56:20 +00:00
Paint blocks on top of the editor
This ensures blocks get mouse events before the editor beneath them. Co-Authored-By: Marshall <marshall@zed.dev>
This commit is contained in:
parent
cc9eff89f5
commit
7e2ff63270
1 changed files with 4 additions and 2 deletions
|
@ -2835,8 +2835,10 @@ impl Element for EditorElement {
|
|||
self.paint_text(text_bounds, &mut layout, cx);
|
||||
|
||||
if !layout.blocks.is_empty() {
|
||||
cx.with_element_id(Some("editor_blocks"), |cx| {
|
||||
self.paint_blocks(bounds, &mut layout, cx);
|
||||
cx.with_z_index(1, |cx| {
|
||||
cx.with_element_id(Some("editor_blocks"), |cx| {
|
||||
self.paint_blocks(bounds, &mut layout, cx);
|
||||
})
|
||||
})
|
||||
}
|
||||
});
|
||||
|
|
Loading…
Reference in a new issue