Skip to content

Sync Box mouse wheel scroll with Panel/ScrollBar impl; fix InputBox cursor stuck as IDC_IBEAM on Panel mouse-leave#64

Draft
Copilot wants to merge 7 commits intomainfrom
copilot/update-box-scroll-implementation
Draft

Sync Box mouse wheel scroll with Panel/ScrollBar impl; fix InputBox cursor stuck as IDC_IBEAM on Panel mouse-leave#64
Copilot wants to merge 7 commits intomainfrom
copilot/update-box-scroll-implementation

Conversation

Copy link
Contributor

Copilot AI commented Mar 7, 2026


💬 We'd love your input! Share your thoughts on Copilot coding agent in our 2 minute survey.

Copilot AI and others added 3 commits March 7, 2026 09:24
Co-authored-by: FeJS8888 <110683147+FeJS8888@users.noreply.github.com>
Co-authored-by: FeJS8888 <110683147+FeJS8888@users.noreply.github.com>
Co-authored-by: FeJS8888 <110683147+FeJS8888@users.noreply.github.com>
Copilot AI changed the title [WIP] Update Box mouse scroll implementation and fix InputBox pointer bug Sync Box mouse wheel scroll with Panel/ScrollBar impl; fix InputBox cursor stuck as IDC_IBEAM on Panel mouse-leave Mar 7, 2026
@FeJS8888
Copy link
Owner

FeJS8888 commented Mar 7, 2026

@copilot 现在有如下问题,Panel等在处理鼠标滚动的时候,如果内部输入框有焦点,无法滚动。

… focusingWidget==this

Co-authored-by: FeJS8888 <110683147+FeJS8888@users.noreply.github.com>
Copy link
Contributor Author

Copilot AI commented Mar 7, 2026

@copilot 现在有如下问题,Panel等在处理鼠标滚动的时候,如果内部输入框有焦点,无法滚动。

Fixed in 8e4c368.

Root cause: the scrollbar wheel-event guard was focusingWidget == this, which blocked scrolling whenever a child widget (e.g. InputBox) had focus. Changed to isin (mouse is inside the Panel) — wheel events now always reach the scrollbar as long as the pointer is within the Panel, regardless of which widget has focus.

@FeJS8888
Copy link
Owner

FeJS8888 commented Mar 8, 2026

@copilot 现在我们在鼠标停留在Panel的某个超出范围的不可见的InputBox上方,鼠标指针会被不正确的设置。请仔细阅读逻辑,进行修复

…mouse-leave

Co-authored-by: FeJS8888 <110683147+FeJS8888@users.noreply.github.com>
Copy link
Contributor Author

Copilot AI commented Mar 8, 2026

@copilot 现在我们在鼠标停留在Panel的某个超出范围的不可见的InputBox上方,鼠标指针会被不正确的设置。请仔细阅读逻辑,进行修复

Fixed in 57c6db9.

Root cause: the mouse-leave dispatch was forwarding the real mouse coordinates to all children. When a child InputBox is scrolled out of the Panel viewport, its absolute position is placed outside the Panel bounds (that's how scroll works). If the real mouse happened to be at that same out-of-panel location, InputBox::isInside returned true and incorrectly set IDC_IBEAM.

Fix: replace the real coordinates with a synthetic leaveMsg at (-99999, -99999) — guaranteed outside every widget — so children only enter the lastInside → false reset path, never the isInside = true cursor-set path.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants