mirror of
https://github.com/zed-industries/zed.git
synced 2025-02-06 10:42:08 +00:00
Dismiss tooltips at capture
(Otherwise they stay open when you hover over the editor, which stops mouse move events propagating)
This commit is contained in:
parent
1da18ebe9a
commit
63b65b2b2e
1 changed files with 4 additions and 4 deletions
|
@ -992,10 +992,6 @@ impl Interactivity {
|
|||
let interactive_bounds = interactive_bounds.clone();
|
||||
|
||||
cx.on_mouse_event(move |event: &MouseMoveEvent, phase, cx| {
|
||||
if phase != DispatchPhase::Bubble {
|
||||
return;
|
||||
}
|
||||
|
||||
let is_hovered = interactive_bounds.visibly_contains(&event.position, cx)
|
||||
&& pending_mouse_down.borrow().is_none();
|
||||
if !is_hovered {
|
||||
|
@ -1003,6 +999,10 @@ impl Interactivity {
|
|||
return;
|
||||
}
|
||||
|
||||
if phase != DispatchPhase::Bubble {
|
||||
return;
|
||||
}
|
||||
|
||||
if active_tooltip.borrow().is_none() {
|
||||
let task = cx.spawn({
|
||||
let active_tooltip = active_tooltip.clone();
|
||||
|
|
Loading…
Reference in a new issue