Fix triple-click highlight bleed into the next line - #1408
Conversation
|
Thanks @dca123, the root-cause analysis here is exactly right. A triple-click leaves the range's end boundary on the next block's text node at offset 0, web-highlighter's splitText(0) hands the painter an empty text node, and wrapping that in a styled mark is the sliver on the following line. Trimming only the boundary nodes (and leaving whitespace between real nodes alone) is the right shape for the fix. Since maintainer edits are allowed, we pushed three small changes straight to your branch rather than sending you round again:
Your behavior and naming are unchanged, the trim logic is byte-identical to what you wrote. Heads-up on something adjacent: an independent fork patch handles a different boundary shape, where the end container is an element and the offset equals Typecheck and the ui suite are green locally; CI is running on the updated head. AI-assisted (Claude) under maintainer direction. |
Summary
Validation
pnpm exec tsc --noEmit -p packages/ui/tsconfig.jsonpnpm --dir apps/hook run build