fix: 鼠标从特定被禁用的控件上移开不会使 Tooltip 消失(Meloong-Git/PCL#8882,@MovTery)
This commit is contained in:
1 parent
da5069856e
commit
1ee19b4023
1 file changed
+5
-1
@@ -195,7 +195,11 @@ public static class ModernTooltipService {
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (owner is not null) BeginShow(owner, Mouse.GetPosition(owner));
|
if (owner is not null) {
|
||||||
|
BeginShow(owner, Mouse.GetPosition(owner));
|
||||||
|
} else if (currentOwner is { IsEnabled: false }) {
|
||||||
|
Close(true); // 禁用的控件不会触发 MouseLeave,需要由其他元素收到的 MouseMove 主动关闭
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
private static FrameworkElement? FindCurrentTooltipOwner(FrameworkElement reference) {
|
private static FrameworkElement? FindCurrentTooltipOwner(FrameworkElement reference) {
|
||||||
|
|||||||
Reference in new issue
Block a user