[PR #710] [CLOSED] fix(scrollbox): preserve manual scroll state during content size recalculations #1509

Closed
opened 2026-03-14 09:40:36 +03:00 by kerem · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/anomalyco/opentui/pull/710
Author: @mocksoul
Created: 2/19/2026
Status: Closed

Base: mainHead: fix/scrollbox-preserve-manual-scroll-on-resize


📝 Commits (1)

  • d2c877a fix(scrollbox): preserve manual scroll state during content size recalculations

📊 Changes

1 file changed (+12 additions, -4 deletions)

View changed files

📝 packages/core/src/renderables/ScrollBox.ts (+12 -4)

📄 Description

Summary

  • Guard _hasManualScroll = false in updateStickyState with !this._isApplyingStickyScroll
  • This preserves the user's scroll position when content grows (streaming), while still allowing reset when the user actually scrolls back to the sticky edge

Regression from #531. Fixes #709.


🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.

## 📋 Pull Request Information **Original PR:** https://github.com/anomalyco/opentui/pull/710 **Author:** [@mocksoul](https://github.com/mocksoul) **Created:** 2/19/2026 **Status:** ❌ Closed **Base:** `main` ← **Head:** `fix/scrollbox-preserve-manual-scroll-on-resize` --- ### 📝 Commits (1) - [`d2c877a`](https://github.com/anomalyco/opentui/commit/d2c877a4eae6f77b7673575bd8d48e4b0cb69f39) fix(scrollbox): preserve manual scroll state during content size recalculations ### 📊 Changes **1 file changed** (+12 additions, -4 deletions) <details> <summary>View changed files</summary> 📝 `packages/core/src/renderables/ScrollBox.ts` (+12 -4) </details> ### 📄 Description ## Summary - Guard `_hasManualScroll = false` in `updateStickyState` with `!this._isApplyingStickyScroll` - This preserves the user's scroll position when content grows (streaming), while still allowing reset when the user actually scrolls back to the sticky edge Regression from #531. Fixes #709. --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
kerem 2026-03-14 09:40:36 +03:00
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
starred/opentui#1509
No description provided.