Repository navigation
fix(tooltip): 提示框可被鼠标拖出 [DeepSeek-V4.1-flash-1017] - #3773
Conversation
Codex Review SummaryThis comment shows the latest Codex review activity on this pull request.
ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings. |
审阅者指南更新了工具提示的鼠标事件处理逻辑,确保在鼠标拖动期间工具提示不会显示、保持激活状态或重新定位;当光标被拖出目标区域时,工具提示会关闭。 鼠标拖动期间抑制工具提示的时序图sequenceDiagram
actor User
participant Target as Target element
participant Tooltip as Tooltip
User->>Target: Mouse move while left button pressed
Target->>Tooltip: OnMove
Tooltip->>Tooltip: _PointInside
alt Cursor leaves target
Tooltip->>Tooltip: _WindDown
else Cursor remains inside target
Tooltip-->>Target: Do not _PlaceNear
end
User->>Target: Tooltip opening attempted while dragging
Target->>Tooltip: OnOpening
Tooltip-->>Target: _Hush
文件级变更
提示和命令与 Sourcery 交互
自定义使用体验访问你的控制面板以便:
获取帮助Original review guide in EnglishReviewer's GuideUpdates tooltip mouse-event handling so tooltips cannot appear, remain active, or be repositioned during a mouse drag, and are dismissed when the cursor is dragged outside the target. Sequence diagram for tooltip suppression during mouse dragsequenceDiagram
actor User
participant Target as Target element
participant Tooltip as Tooltip
User->>Target: Mouse move while left button pressed
Target->>Tooltip: OnMove
Tooltip->>Tooltip: _PointInside
alt Cursor leaves target
Tooltip->>Tooltip: _WindDown
else Cursor remains inside target
Tooltip-->>Target: Do not _PlaceNear
end
User->>Target: Tooltip opening attempted while dragging
Target->>Tooltip: OnOpening
Tooltip-->>Target: _Hush
File-Level Changes
Tips and commandsInteracting with Sourcery
Customizing Your ExperienceAccess your dashboard to:
Getting Help
|
There was a problem hiding this comment.
你好——我发现了 1 个问题
Prompt for AI Agents
Please address the comments from this code review:
## Individual Comments
### Comment 1
<location path="PCL.Core.Wpf/UI/Controls/Tooltip.cs" line_range="292" />
<code_context>
_cursor = Mouse.GetPosition(_target);
- if (_IsCursorPlaced(_target) && _flyout is { IsOpen: true })
+ if (!_PointInside(_target, _cursor))
+ _WindDown();
+ else if (_IsCursorPlaced(_target) && _flyout is { IsOpen: true })
_PlaceNear(_target, _cursor);
</code_context>
<issue_to_address>
**Tooltip stays hidden after drag**
When a drag ends over an eligible tooltip target and the pointer stays still, `_TryClaim` leaves `_target` null while the button is pressed, and `OnLeave` can clear it; `OnRelease` then returns without claiming the element under the pointer, so its tooltip stays hidden until another mouse event.
Have `OnRelease` claim the eligible element under the pointer when `_target` is null.
Also at `PCL.Core.Wpf/UI/Controls/Tooltip.cs:330`, `PCL.Core.Wpf/UI/Controls/Tooltip.cs:370`.
</issue_to_address>Original comment in English
Hey - I've found 1 issue
Prompt for AI Agents
Please address the comments from this code review:
## Individual Comments
### Comment 1
<location path="PCL.Core.Wpf/UI/Controls/Tooltip.cs" line_range="292" />
<code_context>
_cursor = Mouse.GetPosition(_target);
- if (_IsCursorPlaced(_target) && _flyout is { IsOpen: true })
+ if (!_PointInside(_target, _cursor))
+ _WindDown();
+ else if (_IsCursorPlaced(_target) && _flyout is { IsOpen: true })
_PlaceNear(_target, _cursor);
</code_context>
<issue_to_address>
**Tooltip stays hidden after drag**
When a drag ends over an eligible tooltip target and the pointer stays still, `_TryClaim` leaves `_target` null while the button is pressed, and `OnLeave` can clear it; `OnRelease` then returns without claiming the element under the pointer, so its tooltip stays hidden until another mouse event.
Have `OnRelease` claim the eligible element under the pointer when `_target` is null.
Also at `PCL.Core.Wpf/UI/Controls/Tooltip.cs:330`, `PCL.Core.Wpf/UI/Controls/Tooltip.cs:370`.
</issue_to_address>There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 557e9a0253
ℹ️ About Codex in GitHub
Codex has been enabled to automatically review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
When you sign up for Codex through ChatGPT, Codex can also answer questions or update the PR, like "@codex address that feedback".
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: a7899eabe9
ℹ️ About Codex in GitHub
Codex has been enabled to automatically review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
When you sign up for Codex through ChatGPT, Codex can also answer questions or update the PR, like "@codex address that feedback".
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 3c70850b9f
ℹ️ About Codex in GitHub
Codex has been enabled to automatically review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
When you sign up for Codex through ChatGPT, Codex can also answer questions or update the PR, like "@codex address that feedback".
3c70850 to
6372dd1
Compare
变更说明 / Summary
长图
关联 Issue / Related Issue
验证方式 / Verification
AI 使用情况 / Generative Artificial Intelligence Usage
提交前检查 / Checklist
Sourcery 摘要
按下鼠标左键时,关闭并禁止工具提示活动,避免工具提示干扰鼠标拖动。
错误修复:
改进:
Original summary in English
Sourcery 总结
通过在鼠标左键按下期间禁用工具提示的激活,并在指针离开时关闭已打开的工具提示,防止工具提示干扰鼠标拖动。
错误修复:
增强功能:
Original summary in English
Sourcery 摘要
在按住鼠标左键时,持续隐藏并关闭工具提示,避免其妨碍鼠标拖动。
Bug 修复:
功能增强:
Original summary in English
Sourcery 摘要
通过在指针移动和离开事件期间抑制工具提示的激活并统一关闭工具提示,避免工具提示干扰鼠标拖动。
Bug 修复:
功能增强:
Original summary in English
Summary by Sourcery
Prevent tooltips from interfering with mouse dragging by suppressing activation and closing them consistently during pointer movement and leave events.
Bug Fixes:
Enhancements: