Line wrap does not break long words; horizontal scroll remains when wrap enabled #152

Closed
opened 2026-09-10 13:18:48 +00:00 by fen · 1 comment
Collaborator

Reported in chat

With line wrap enabled (editor + viewer toggle, the shared localStorage pref), a long unbroken word is NOT cut mid-word and wrapped. The user expects:

  1. When wrap is ON, a word longer than the line is broken in the middle and wrapped.
  2. NO horizontal scrolling at all while wrap is enabled.

Repro: create a paste containing a very long unbroken token (e.g. a long base64/URL string), enable line wrap, observe the long word overflowing and a horizontal scrollbar appearing.

Context: the codebody gets different wrap behavior than the rest of the UI (deliberate exception to the word-break: normal; overflow-wrap: break-word rule used in message boxes). The wrap toggle presumably sets white-space: pre-wrap but without overflow-wrap: anywhere/break-word (or word-break: break-all), long tokens still overflow.

Definition of done: wrap ON = no horizontal scroll possible at 1400x900 and 375x812, long words broken mid-token; wrap OFF preserves current behavior (no wrap, horizontal scroll allowed). Verify rendered output, not just CSS.

**Reported in chat** With line wrap enabled (editor + viewer toggle, the shared localStorage pref), a long unbroken word is NOT cut mid-word and wrapped. The user expects: 1. When wrap is ON, a word longer than the line is broken in the middle and wrapped. 2. NO horizontal scrolling at all while wrap is enabled. Repro: create a paste containing a very long unbroken token (e.g. a long base64/URL string), enable line wrap, observe the long word overflowing and a horizontal scrollbar appearing. Context: the codebody gets different wrap behavior than the rest of the UI (deliberate exception to the `word-break: normal; overflow-wrap: break-word` rule used in message boxes). The wrap toggle presumably sets `white-space: pre-wrap` but without `overflow-wrap: anywhere`/`break-word` (or `word-break: break-all`), long tokens still overflow. Definition of done: wrap ON = no horizontal scroll possible at 1400x900 and 375x812, long words broken mid-token; wrap OFF preserves current behavior (no wrap, horizontal scroll allowed). Verify rendered output, not just CSS.
fen added spent time 15 seconds 2026-09-10 13:33:23 +00:00
fen added the QA label 2026-09-10 13:43:57 +00:00
fen added spent time 5 seconds 2026-09-10 13:43:58 +00:00
fen closed this issue 2026-09-10 13:51:28 +00:00
fen added spent time 19 minutes 2026-09-10 13:54:10 +00:00
fen added spent time 15 minutes 2026-09-10 13:54:48 +00:00
fen added spent time 5 minutes 2026-09-10 13:54:48 +00:00
fen added spent time 3 minutes 2026-09-10 13:55:08 +00:00
Author
Collaborator

QA passed (agent fen): rebased fix-152 onto dev (fix-138 had landed), build + go test ./... green, PR #155 merged (fc07d8b), CI docker run success for the merge commit, palette-dev rolled out. Live verified on palette-dev: 800-char token broken mid-word with wrap ON at 1400x900 and 375x812, zero horizontal scroll on paste view and editor (scrollWidth==clientWidth), wrap OFF keeps horizontal scroll, verified in dark and light presets, no 375px topbar overflow. #152

QA passed (agent fen): rebased fix-152 onto dev (fix-138 had landed), build + go test ./... green, PR #155 merged (fc07d8b), CI docker run success for the merge commit, palette-dev rolled out. Live verified on palette-dev: 800-char token broken mid-word with wrap ON at 1400x900 and 375x812, zero horizontal scroll on paste view and editor (scrollWidth==clientWidth), wrap OFF keeps horizontal scroll, verified in dark and light presets, no 375px topbar overflow. #152
fen added spent time 7 minutes 2026-09-10 13:59:40 +00:00
fen added spent time 1 second 2026-09-10 14:02:14 +00:00
fen deleted spent time 2026-09-10 14:02:14 +00:00
- 1 second
Sign in to join this conversation.
1 Participants
Notifications
Total Time Spent: 50 minutes
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: poslop/palette#152