mirror of
https://github.com/anomalyco/opentui.git
synced 2026-04-25 04:55:58 +03:00
[PR #663] [MERGED] fix(renderer): fallback scroll events to focused renderable #1475
Labels
No labels
bug
core
documentation
feature
good first issue
help wanted
pull-request
question
react
solid
tmux
windows
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
starred/opentui#1475
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
📋 Pull Request Information
Original PR: https://github.com/anomalyco/opentui/pull/663
Author: @remorses
Created: 2/10/2026
Status: ✅ Merged
Merged: 2/11/2026
Merged by: @kommander
Base:
main← Head:fix-scroll-fallback-focused-target📝 Commits (3)
d73bd3bfix(renderer): fallback scroll events to focused renderable1166999fix: add .focused check to scroll fallback target and clarify test name7ea7a2cMerge branch 'main' into fix-scroll-fallback-focused-target📊 Changes
2 files changed (+43 additions, -5 deletions)
View changed files
📝
packages/core/src/renderer.ts(+11 -4)📝
packages/core/src/tests/renderer.mouse.test.ts(+32 -1)📄 Description
Why
I hit this while testing
critique: mouse-wheel scrolling was not working reliably in the main diff scrollbox unless the pointer happened to be over a hit-tested renderable cell. That made the scrollbox feel broken in normal usage.Problem
For wheel events, renderer mouse handling currently consumes scroll input even when hit-testing returns no renderable target. In that case, no
onMouseScrollhandler runs, so focused scroll containers can appear unresponsive.Fix
I kept existing hit-test dispatch and added a fallback target:
This preserves current semantics while making wheel input reach the active scroll container when the pointer is over non-hit-tested cells.
Validation
I added a regression test in
packages/core/src/tests/renderer.mouse.test.tsthat verifies scroll events outside hit-tested targets are still dispatched to a focused renderable.🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.