[PR #531] [MERGED] fix(scrollbox): reset _hasManualScroll when user scrolls back to sticky position #1383

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

📋 Pull Request Information

Original PR: https://github.com/anomalyco/opentui/pull/531
Author: @bradleat
Created: 1/15/2026
Status: Merged
Merged: 1/18/2026
Merged by: @kommander

Base: mainHead: sticky-scroll-reset-fix


📝 Commits (4)

  • a624ac2 fix(scrollbox): reset _hasManualScroll when user scrolls back to sticky position
  • a9f3bd4 test(scrollbox): add regression tests for issue #530
  • 6eaa0e2 refactor(scrollbox): remove comments from fix
  • 97e5b94 Merge branch 'main' into sticky-scroll-reset-fix

📊 Changes

2 files changed (+100 additions, -0 deletions)

View changed files

📝 packages/core/src/renderables/ScrollBox.ts (+12 -0)
📝 packages/core/src/tests/scrollbox.test.ts (+88 -0)

📄 Description

Summary

  • Fixes #530 - ScrollBox with stickyScroll={true} and stickyStart="bottom" randomly scrolls to top after user input
  • Resets _hasManualScroll = false in updateStickyState() when user scrolls back to their sticky position
  • Handles edge case where content fits in viewport (maxScrollTop === 0)

Test plan

  • All 2941 existing tests pass
  • Build succeeds
  • Verified locally: terminal emulator stays pinned to bottom after scrolling up then back down

🔄 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/531 **Author:** [@bradleat](https://github.com/bradleat) **Created:** 1/15/2026 **Status:** ✅ Merged **Merged:** 1/18/2026 **Merged by:** [@kommander](https://github.com/kommander) **Base:** `main` ← **Head:** `sticky-scroll-reset-fix` --- ### 📝 Commits (4) - [`a624ac2`](https://github.com/anomalyco/opentui/commit/a624ac29929d9b41bcc7faa83c9013cd13f17cc3) fix(scrollbox): reset _hasManualScroll when user scrolls back to sticky position - [`a9f3bd4`](https://github.com/anomalyco/opentui/commit/a9f3bd442d056c79147639ce208acfb6dc0f0073) test(scrollbox): add regression tests for issue #530 - [`6eaa0e2`](https://github.com/anomalyco/opentui/commit/6eaa0e2db0d54816d3cab5abc9b7262365ed5964) refactor(scrollbox): remove comments from fix - [`97e5b94`](https://github.com/anomalyco/opentui/commit/97e5b94f4d287951e34eae8b170291a5b6a527d9) Merge branch 'main' into sticky-scroll-reset-fix ### 📊 Changes **2 files changed** (+100 additions, -0 deletions) <details> <summary>View changed files</summary> 📝 `packages/core/src/renderables/ScrollBox.ts` (+12 -0) 📝 `packages/core/src/tests/scrollbox.test.ts` (+88 -0) </details> ### 📄 Description ## Summary - Fixes #530 - ScrollBox with `stickyScroll={true}` and `stickyStart="bottom"` randomly scrolls to top after user input - Resets `_hasManualScroll = false` in `updateStickyState()` when user scrolls back to their sticky position - Handles edge case where content fits in viewport (`maxScrollTop === 0`) ## Test plan - [x] All 2941 existing tests pass - [x] Build succeeds - [x] Verified locally: terminal emulator stays pinned to bottom after scrolling up then back down --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
kerem 2026-03-14 09:33:52 +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#1383
No description provided.