You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Improve scrolling behavior for code blocks by:
- Adding a consistent SCROLL_SNAP_TOLERANCE constant (20px)
- Tracking outer container scroll position
- Moving scrolling logic to happen immediately after Shiki highlighting completes
- Ensuring both inner and outer containers scroll to bottom simultaneously when appropriate
This creates a more responsive and consistent scrolling experience without relying on arbitrary timeouts.
Signed-off-by: Eric Wheeler <[email protected]>
collapsedHeight: 500,// Default collapsed height in pixels
13
13
}
14
14
15
+
// Tolerance in pixels for determining when a container is considered "at the bottom"
16
+
exportconstSCROLL_SNAP_TOLERANCE=20
17
+
15
18
/*
16
19
overflowX: auto + inner div with padding results in an issue where the top/left/bottom padding renders but the right padding inside does not count as overflow as the width of the element is not exceeded. Once the inner div is outside the boundaries of the parent it counts as overflow.
0 commit comments