mirror of
https://github.com/outline/outline.git
synced 2026-11-22 05:51:43 +03:00
* fix: useWindowScrollbarWidth measured horizontal overflow, not scrollbar width document.documentElement.scrollWidth - clientWidth measures horizontal content overflow, which is 0 in the normal case even when a vertical scrollbar is visible — so the hook always reported 0 on platforms with classic (non-overlay) scrollbars, and the right sidebar's fixed-position content in Aside was never narrowed to account for the scrollbar. Measure window.innerWidth - documentElement.clientWidth instead, which is the layout viewport width including the scrollbar minus the width excluding it. Verified in headless Chromium: with a forced vertical scrollbar the old expression returns 0 while the new one returns the true scrollbar width (15px). Co-Authored-By: Claude Fable 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01DjhYP8svLL8dU98tmQJ7RK * chore: Remove explanatory comment Co-Authored-By: Claude Fable 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01DjhYP8svLL8dU98tmQJ7RK --------- Co-authored-by: Claude <noreply@anthropic.com>