Skip to content

Commit

Permalink
Don't hide tooltip when pointer is over tooltip.
Browse files Browse the repository at this point in the history
Fixes #8638
  • Loading branch information
grokys committed Nov 10, 2023
1 parent 6e4729f commit c4ec885
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions src/Avalonia.Controls/ToolTipService.cs
Original file line number Diff line number Diff line change
Expand Up @@ -109,6 +109,11 @@ private void ControlPointerEntered(object? sender, PointerEventArgs e)
private void ControlPointerExited(object? sender, PointerEventArgs e)
{
var control = (Control)sender!;

// If the control is showing a tooltip and the pointer is over the tooltip, don't close it.
if (control.GetValue(ToolTip.ToolTipProperty) is { } tooltip && tooltip.IsPointerOver)
return;

Close(control);
}

Expand Down

0 comments on commit c4ec885

Please sign in to comment.