[PR #470] [CLOSED] Fix scrollbox hit-testing to respect overflow clipping #1338

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

📋 Pull Request Information

Original PR: https://github.com/anomalyco/opentui/pull/470
Author: @nyxkrage
Created: 1/4/2026
Status: Closed

Base: mainHead: fix/scrollbox-hit-testing-clipping


📝 Commits (2)

  • 1ea151c fix: clip hit grid to scissor rect for correct overflow hit-testing
  • e63daab refactor: move hit grid clipping to zig

📊 Changes

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

View changed files

📝 packages/core/src/zig/renderer.zig (+6 -4)

📄 Description

Exports OptimizedBuffer.clipRectToScissor to the TypeScript interface and uses it to clip hit rects to the active scissor before adding them to the hit grid.
This fixes scrollbox content receiving clicks outside its visible bounds.

See #467 for repro example.


🔄 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/470 **Author:** [@nyxkrage](https://github.com/nyxkrage) **Created:** 1/4/2026 **Status:** ❌ Closed **Base:** `main` ← **Head:** `fix/scrollbox-hit-testing-clipping` --- ### 📝 Commits (2) - [`1ea151c`](https://github.com/anomalyco/opentui/commit/1ea151c7131848610f391d817f521ea1e949d400) fix: clip hit grid to scissor rect for correct overflow hit-testing - [`e63daab`](https://github.com/anomalyco/opentui/commit/e63daab80898ef605e514efafbcde2f6311987fe) refactor: move hit grid clipping to zig ### 📊 Changes **1 file changed** (+6 additions, -4 deletions) <details> <summary>View changed files</summary> 📝 `packages/core/src/zig/renderer.zig` (+6 -4) </details> ### 📄 Description Exports OptimizedBuffer.clipRectToScissor to the TypeScript interface and uses it to clip hit rects to the active scissor before adding them to the hit grid. This fixes scrollbox content receiving clicks outside its visible bounds. See #467 for repro example. --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
kerem 2026-03-14 09:31:26 +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#1338
No description provided.