Single-line inputs strip pasted line breaks and never paint a second line
Fixes the reported issue: pasting content containing line breaks into a single-line input displayed multiple lines — with the extra line painting outside the field's border.
Two independent layers:
- Sanitize at the edit seam. Single-line kinds (input, text field, search field, combobox) strip
\r/\nfrom inserted text per the WHATWG value-sanitization rule for single-line inputs (Chromium's paste behavior; documented with citations at the sanitize site). The rule sits in the v0.5.2 edit-derivation choke point with the order derive → sanitize → stamp → apply, so the retained editor, the core'son_inputmirror (both tiers), and replay all hear byte-identical bytes — covering clipboard paste, context-menu paste, typed/automationtext_input, IME composition (sanitized at preview so a commit can never land a break), and direct runtime writes, with the app-side fallback derivation applying the identical rule. An insert that strips to nothing is suppressed (pasting bare newlines never eats a live selection), and Enter-in-input is pinned as not-an-insert even against hosts that stuff a newline into the key event. Textareas are untouched. - Defensive render containment. Independent of sanitization, a single-line field whose value holds a break (a model-set value can — legitimately, from a Zig core) presents
\n/\ras spaces byte-for-byte, so caret/selection/composition/hit-test offsets address the raw value unchanged while layout produces exactly one line on the GPU engine, the reference renderer, and packet hosts; the content-rect clip is additionally forced whenever the raw value holds a break. Copy, semantics, and automation still report the raw value.
Replay needed no journal changes — sanitization is deterministic derivation over the recorded raw events, pinned by extending the reference recording with a textarea→search-field multi-line paste.
Tests across events/ui/clipboard/text/session suites, all sabotage-verified (disabling the rule fails 10+ tests; disabling presentation or the forced clip fails the containment pins). Full battery, validate, tooling, examples, ts-core e2e all green.
The latest updates on your projects. Learn more about Vercel for GitHub.
| Project | Deployment | Actions | Updated (UTC) |
|---|---|---|---|
| native-sdk | Preview, Comment | Jul 17, 2026 7:57am |