feat: allow users to force hide scrollbars#755
Open
lofcz wants to merge 1 commit intoKingSora:masterfrom
Open
Conversation
df3c944 to
917e07e
Compare
917e07e to
808138c
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Thanks for OverlayScrollbars, long time user here.. (I know OSS maintainers hear this a lot first hand, but still).
Problem
In a split layout, I animate the chat column with transforms, then switch to flex. On desktop, with
scrollbars.autoHide: "move", the pointer often crosses the moving host during the animation. That drives the normal pointer/scroll auto-hide logic. When the animation ends and layout updates, the scrollbar can flash visible for a moment even if the cursor is no longer over the pane, it’s especially noticeable with the default opacity transition on.os-scrollbar.2026-03-20.11-09-35.mp4
Proposed Solution
Add an imperative instance method so embedders can temporarily force-hide scrollbars and ignore the usual auto-show sensor paths until they call the method again to restore normal behavior:
export interface OverlayScrollbars { + scrollbarsHidden(hidden: boolean): void; }When
hidden === true, the instance should keep overlay scrollbars in the hidden state across internalupdate()cycles (e.g. after resize) so layout changes don’t briefly applyos-scrollbar-visiblewithout the matchingauto-hidehidden state.