Skip to content

fix: prevent layout shift when pasting long unbroken strings in composer input - #13044

Open
rekha0suthar wants to merge 1 commit into
continuedev:mainfrom
rekha0suthar:fix/input-overflow-long-strings
Open

fix: prevent layout shift when pasting long unbroken strings in composer input#13044
rekha0suthar wants to merge 1 commit into
continuedev:mainfrom
rekha0suthar:fix/input-overflow-long-strings

Conversation

@rekha0suthar

Copy link
Copy Markdown

Problem

Pasting a long unbroken string (e.g. a base64 token, a minified JS bundle, a long URL with no spaces) into the composer input box caused the TipTap editor content to overflow its flex container. This pushed the send button out of view and broke the overall input layout.

Root Cause

Two missing CSS properties:

  1. No overflow-wrap/word-break on .tiptap — without these, the browser treats the unbroken string as a single unbreakable word and renders it at full width, overflowing the container.

  2. No min-width: 0 on the flex container — flex items default to min-width: auto, which means they will never shrink below their content width. This prevents overflow-wrap from working inside a flex layout.

Fix

TipTapEditor.css — add a .tiptap rule:

.tiptap {
  overflow-wrap: break-word;
  word-break: break-word;
  min-width: 0;
}

ContinueInputBox.tsx — add min-w-0 to the outer flex container:

<div className={`relative flex flex-col px-2 min-w-0`}>

Testing

  • Paste a long base64 string or a URL with no spaces into the input box
  • Before: editor overflows, send button disappears off-screen
  • After: text wraps correctly, layout stays intact

Fixes #13016


🤖 Generated with Claude Code

@rekha0suthar
rekha0suthar requested a review from a team as a code owner July 28, 2026 06:42
@rekha0suthar
rekha0suthar requested review from sestinj and removed request for a team July 28, 2026 06:42
@github-actions

github-actions Bot commented Jul 28, 2026

Copy link
Copy Markdown
Contributor

All contributors have signed the CLA ✍️ ✅
Posted by the CLA Assistant Lite bot.

@rekha0suthar

Copy link
Copy Markdown
Author

I have read the CLA Document and I hereby sign the CLA

@rekha0suthar

Copy link
Copy Markdown
Author

recheck

@rekha0suthar
rekha0suthar force-pushed the fix/input-overflow-long-strings branch from 58a5156 to 361d5d1 Compare July 28, 2026 07:13
@rekha0suthar

Copy link
Copy Markdown
Author

recheck

Pasting a long unbroken string (e.g. base64 tokens, minified code) into
the composer input caused the TipTap editor to overflow its flex container,
which pushed the send button out of alignment and broke the input layout.

Two changes:
- Added overflow-wrap: break-word and word-break: break-word to the
  .tiptap CSS rule so long tokens wrap instead of overflowing.
- Added min-w-0 to the flex container in ContinueInputBox so that
  the flex child can shrink below its natural content width, which is
  required for overflow-wrap to take effect inside a flex layout.

Fixes continuedev#13016
@rekha0suthar
rekha0suthar force-pushed the fix/input-overflow-long-strings branch from 361d5d1 to 4091c6d Compare July 28, 2026 07:26
@rekha0suthar

Copy link
Copy Markdown
Author

I have read the CLA Document and I hereby sign the CLA

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Bug: Composer input overflow with long unbroken string causes layout shift and send button misalignment

1 participant