mirror of
https://github.com/zed-industries/zed.git
synced 2024-12-28 08:35:33 +03:00
Fix editor stealing click events from copy-error button (#4046)
This fixes the click event on the "copy error message" button by changing the `editor` element to ignore mouse-down events when the default was prevented. That's similar to how `div` does it. Release Notes: - Fixed a bug that prevented "copy error message" button from being clicked.
This commit is contained in:
commit
80c0d09b15
@ -388,7 +388,9 @@ impl EditorElement {
|
||||
let mut click_count = event.click_count;
|
||||
let modifiers = event.modifiers;
|
||||
|
||||
if gutter_bounds.contains(&event.position) {
|
||||
if cx.default_prevented() {
|
||||
return;
|
||||
} else if gutter_bounds.contains(&event.position) {
|
||||
click_count = 3; // Simulate triple-click when clicking the gutter to select lines
|
||||
} else if !text_bounds.contains(&event.position) {
|
||||
return;
|
||||
|
Loading…
Reference in New Issue
Block a user