mirror of
https://github.com/zed-industries/zed.git
synced 2025-01-16 15:11:25 +00:00
Fire click event only when using left button (#3584)
Release Notes: - N/A
This commit is contained in:
commit
76cea3e7e8
1 changed files with 1 additions and 0 deletions
|
@ -964,6 +964,7 @@ impl Interactivity {
|
|||
let interactive_bounds = interactive_bounds.clone();
|
||||
cx.on_mouse_event(move |event: &MouseDownEvent, phase, cx| {
|
||||
if phase == DispatchPhase::Bubble
|
||||
&& event.button == MouseButton::Left
|
||||
&& interactive_bounds.visibly_contains(&event.position, cx)
|
||||
{
|
||||
*pending_mouse_down.borrow_mut() = Some(event.clone());
|
||||
|
|
Loading…
Reference in a new issue