mirror of
https://github.com/anomalyco/opentui.git
synced 2026-04-25 04:55:58 +03:00
[PR #724] scrollbox: add scrollChildIntoView method #739
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#739
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/724
Author: @simonklee
Created: 2/21/2026
Status: 🔄 Open
Base:
main← Head:scroll-into-view📝 Commits (5)
2eafa75scrollbox: add scrollChildIntoView methode3c3df3Merge branch 'main' into scroll-into-view7df4ac3Merge branch 'main' into scroll-into-viewd2cb577Merge branch 'main' into scroll-into-view52a0978Merge branch 'main' into scroll-into-view📊 Changes
2 files changed (+200 additions, -0 deletions)
View changed files
📝
packages/core/src/renderables/ScrollBox.ts(+49 -0)📝
packages/core/src/tests/scrollbox.test.ts(+151 -0)📄 Description
Add a convenience API to keep a descendant visible without repeated
call-site math around viewport bounds and scroll deltas.
Use nearest alignment on both axes instead of DOM's default
block:start so keyboard navigation moves as little as possible.
Mirror CSSOM View nearest behavior for oversized children, including
no-op when an oversized child already intersects the viewport, to
avoid jumpy scrolling.
See https://drafts.csswg.org/cssom-view/#dom-element-scrollintoview
Fixes #716
🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.