Avoid creating occlusions for editor blocks, since these block mouse wheel events (#20649)

Just block mouse down events, and in the case of the inline assist
prompt, set the default cursor.

Release Notes:

- N/A

Co-authored-by: Richard <richard@zed.dev>
This commit is contained in:
Max Brunsfeld
2024-11-13 21:02:54 -08:00
committed by GitHub
co-authored by Richard
parent 6b3c909155
commit 093c9cc87b
6 changed files with 20 additions and 13 deletions
+2 -2
View File
@@ -10431,7 +10431,7 @@ impl Editor {
text_style = text_style.highlight(highlight_style);
}
div()
.occlude()
.block_mouse_down()
.pl(cx.anchor_x)
.child(EditorElement::new(
&rename_editor,
@@ -14681,7 +14681,7 @@ pub fn diagnostic_block_renderer(
.group(group_id.clone())
.relative()
.size_full()
.occlude()
.block_mouse_down()
.pl(cx.gutter_dimensions.width)
.w(cx.max_width - cx.gutter_dimensions.full_width())
.child(
+2 -2
View File
@@ -435,7 +435,7 @@ impl Editor {
h_flex()
.id(cx.block_id)
.occlude()
.block_mouse_down()
.h(cx.line_height())
.w_full()
.border_t_1()
@@ -714,7 +714,7 @@ impl Editor {
h_flex()
.id(cx.block_id)
.occlude()
.block_mouse_down()
.bg(deleted_hunk_color)
.h(height as f32 * cx.line_height())
.w_full()