Frontmatter
| id | 9395 |
| title | E2E: Refine GridRowScrollPinning to Target Explicit Thumb Drags |
| state | Closed |
| labels | enhancementaiarchitecturegrid |
| assignees | tobiu |
| createdAt | Mar 8, 2026, 6:12 PM |
| updatedAt | Mar 8, 2026, 6:15 PM |
| githubUrl | https://github.com/neomjs/neo/issues/9395 |
| author | tobiu |
| commentsCount | 1 |
| parentIssue | 9380 |
| subIssues | [] |
| subIssuesCompleted | 0 |
| subIssuesTotal | 0 |
| blockedBy | [] |
| blocking | [] |
| closedAt | Mar 8, 2026, 6:15 PM |
E2E: Refine GridRowScrollPinning to Target Explicit Thumb Drags
tobiu added parent issue #9380 on Mar 8, 2026, 6:12 PM
tobiu assigned to @tobiu on Mar 8, 2026, 6:14 PM

tobiu
Mar 8, 2026, 6:14 PM
Input from Gemini 3.1 Pro:
✦ The "Stateful Source Detection" refactor has been successfully tested, committed, and pushed.
Final Summary:
- The addon now strictly tracks user intent via
mousedownon theVerticalScrollbarcomponent, engaging anisThumbDraggingstate.- Wheel scrolling, trackpad swipes, and body drag scrolling are 100% ignored, completely restoring perfect, native, jitter-free scroll physics to the core UX.
- The CSS Variable optical pinning (
--grid-row-pin-offset) now functions exclusively as a targeted safety net for manual scrollbar thumb dragging, freezing the stale rows to eliminate the white flash, and gracefully healing via a dynamic globalmouseuplistener when the user releases the thumb.This concludes the architectural goals defined in this ticket. Closing.
tobiu closed this issue on Mar 8, 2026, 6:15 PM
This ticket documents the refinement of the
GridRowScrollPinningaddon to solve the "wheel jitter" regression.The Problem: The previous implementation relied on a mathematical
deltaYthreshold to engage optical pinning. However, Playwright telemetry revealed that this generic threshold caused the addon to fight against native smooth wheel scrolling. A fast wheel spin could exceed the threshold, triggering the addon to instantly halt the native scroll momentum and then "snap" when the worker caught up, resulting in extreme ping-pong jitter.The Solution (Stateful Detection): We have abandoned the generic distance threshold in favor of explicit interaction intent. The addon now only pins the UI when the user is physically dragging the scrollbar thumb.
Implementation Details:
ScrollManagernow passes thescrollbarIdto the addon during registration.GridRowScrollPinningattachesmousedownandtouchstartlisteners explicitly to the customVerticalScrollbarcomponent, engaging anisThumbDraggingstate.windowmouseuplistener is dynamically attached during the drag and immediately removed upon release to prevent memory leaks in Card Layout unmount scenarios.scrolllistener acts as an ultimate fallback to clear theisThumbDraggingstate if the globalmouseupis somehow missed.applyPinningnow only applies the CSS optical shift ifisThumbDraggingis true.The Result: Wheel scrolling, trackpad scrolling, and Body Drag scrolling (
GridDragScroll) are now 100% ignored by this addon, preserving their perfect native smooth physics. Optical pinning acts purely as an unbreakable safety net for manual scrollbar thumb dragging to prevent the white flash.