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
{{ message }}
Repository navigation
desktop: code blocks hide horizontal scrollbars and cannot wrap long lines #60143
On Windows there is no visible affordance. The only ways to reach the rest of the line are Shift+wheel or selecting text and dragging. There is also no wrap option. A code block taller than the viewport loses its copy button while scrolling too (tracked separately in #53519).
This was reported in #49535, but that issue was closed as a v1 issue, not fixed.
Thanks for the detailed report, and for following up on #49535 on v2.
You're asking for long lines in code blocks to be reachable without a hidden gesture: a visible horizontal scrollbar when a block overflows (always, or on hover/focus), and/or a "wrap long lines" toggle. The hidden scrollbar comes from deliberate styling in markdown.css rather than a malfunction, so I've filed this as a feature request. Maintainers will consider it.
I'd like to pick this up. Proposal: a "Wrap long lines in code blocks" toggle in Settings > Appearance, off by default so the current look doesn't change. Same pattern as Reduce motion (#57103): a boolean in the appearance settings, set as an attribute on the root, plus one rule on markdown pre (white-space: pre-wrap; overflow-wrap: anywhere). I've tested the CSS in the dev web UI and it works.
Separate question: when wrapping is off, would you accept a thin visible scrollbar on blocks that overflow? Fine to leave it out if hiding it is deliberate.
2. I'd like to pick this up. Proposal: a "Wrap long lines in code blocks" toggle in Settings > Appearance, off by default so the current look doesn't change. Same pattern as Reduce motion (#57103): a boolean in the appearance settings, set as an attribute on the root, plus one rule on markdown pre (white-space: pre-wrap; overflow-wrap: anywhere). I've tested the CSS in the dev web UI and it works.
Separate question: when wrapping is off, would you accept a thin visible scrollbar on blocks that overflow? Fine to leave it out if hiding it is deliberate.
Thanks for picking this up — the Reduce motion pattern (#57103) is a good fit for this.
I'd like both parts to land together rather than as alternatives:
Wrap toggle: agreed, off by default so the current look doesn't change. Since the styles live in the shared packages/session-ui, one change covers desktop and web. Small ask: make the scrollable pre focusable (tabindex="0") so keyboard users can scroll it when wrapping is off — right now there's no focusable affordance at all.
white-space: pre-wrap alone won't break a single 2000+ char token; overflow-wrap: anywhere (or word-break: break-all) is needed. anywhere also affects min-content sizing, so worth checking the block still behaves inside flex/grid parents.
Add the new boolean as an optional field with a fallback (like sidebarOpen) so existing stored settings still decode.
Thanks for the notes. Agreed on adding the setting as an optional field with a fallback, checking that overflow-wrap: anywhere behaves inside flex/grid parents, and saying in the PR where #57432 and #53519 stand.
I'll keep the PR to the wrap toggle, though. A visible scrollbar and tabindex change the default for everyone, so I'd leave those to the maintainers to decide.
@Brendonovich , could you confirm the toggle approach (off by default, same pattern as Reduce motion in #57103)? I'll build it in my fork meanwhile and open the PR once it's approved.
Activity
opencodejr commentedon Oct 29, 2026
Thanks for the detailed report, and for following up on #49535 on v2.
You're asking for long lines in code blocks to be reachable without a hidden gesture: a visible horizontal scrollbar when a block overflows (always, or on hover/focus), and/or a "wrap long lines" toggle. The hidden scrollbar comes from deliberate styling in
markdown.cssrather than a malfunction, so I've filed this as a feature request. Maintainers will consider it.Related issues:
There's no plugin workaround for now, because plugins can't change the desktop or web UI's styles.
wheresvic commentedon Oct 30, 2026
I'd like to pick this up. Proposal: a "Wrap long lines in code blocks" toggle in Settings > Appearance, off by default so the current look doesn't change. Same pattern as Reduce motion (#57103): a boolean in the appearance settings, set as an attribute on the root, plus one rule on markdown
pre(white-space: pre-wrap; overflow-wrap: anywhere). I've tested the CSS in the dev web UI and it works.Separate question: when wrapping is off, would you accept a thin visible scrollbar on blocks that overflow? Fine to leave it out if hiding it is deliberate.
MercuryOoO commentedon Nov 1, 2026
Thanks for picking this up — the Reduce motion pattern (#57103) is a good fit for this.
I'd like both parts to land together rather than as alternatives:
Wrap toggle: agreed, off by default so the current look doesn't change. Since the styles live in the shared
packages/session-ui, one change covers desktop and web. Small ask: make the scrollableprefocusable (tabindex="0") so keyboard users can scroll it when wrapping is off — right now there's no focusable affordance at all.Visible scrollbar when wrapping is off: yes, please. A thin scrollbar that only appears when the block actually overflows is enough; it doesn't have to be always visible. With it hidden, long lines are only reachable via Shift+wheel or drag-select, and we're seeing the same complaint elsewhere (Bug: Settings & Connect Provider dialogs hide their scrollbar (v2 layout) — Windows and Ubuntu #46680, no scrollbar in settings #56309, [Desktop] Settings > Providers page has no scrollbar and cannot scroll to providers below the visible area #48458), so I'd treat this as an accessibility fix rather than a style preference.
Notes for the PR:
white-space: pre-wrapalone won't break a single 2000+ char token;overflow-wrap: anywhere(orword-break: break-all) is needed.anywherealso affects min-content sizing, so worth checking the block still behaves inside flex/grid parents.sidebarOpen) so existing stored settings still decode.A per-code-block wrap toggle next to the copy button would be a nice bonus, but the global setting is the part I care about. Go ahead and open the PR.
wheresvic commentedon Nov 1, 2026
Thanks for the notes. Agreed on adding the setting as an optional field with a fallback, checking that
overflow-wrap: anywherebehaves inside flex/grid parents, and saying in the PR where #57432 and #53519 stand.I'll keep the PR to the wrap toggle, though. A visible scrollbar and
tabindexchange the default for everyone, so I'd leave those to the maintainers to decide.@Brendonovich , could you confirm the toggle approach (off by default, same pattern as Reduce motion in #57103)? I'll build it in my fork meanwhile and open the PR once it's approved.