E2.07.2mask caret and paste interferencedesignresearch

Masks interfere with paste and caret movement

Aliases: input mask caret · paste eaten by mask · caret jumping

What it is

A mask splits the slot into writable cells and system-owned separators. Pasting a whole string, using arrow keys to edit the middle, or deleting onto a separator sends the caret to wherever the mask thinks the next writable cell is; the value is truncated, duplicated, or shifted. That is mask caret and paste interference. It is a conflict while editing existing content, not “auto-hyphens reduce load,” and not “only one regional format is accepted.”

Why it happens

The mask keeps two indexes: the character subscript the user believes, and the internal cell after skipping furniture. A pasted string that already contains hyphens, spaces, or a country code is digested cell by cell: some implementations strip non-digits and re-layout; some insert a second hyphen on top of an existing one; some silently clip the clipboard when length is full. A left arrow onto a separator may jump two cells at once, or stick on an uneditable dash, so backspace deletes furniture instead of a digit. The user’s model is “a string”; the mask’s model is “a row of rooms with fixed furniture.” The models disagree on mid-string edits, paste, and select-all.

Studying it

Prepare three clipboards: digits only, already locally punctuated, and with an international prefix. Paste each into the masked slot; record the resulting string, caret landing, and truncation. Then move the caret into the middle, change one digit, and backspace from the end. Outcomes: one-paste success, mid-edit shift, accidental separator deletes. Mask libraries differ sharply; name the implementation rather than promoting one library’s bug to a law of “masks.” Test keyboard users and pointer clicks into the middle separately.

Where it stops holding

If people never paste and only type from an empty slot in order, caret conflict almost never appears. On mobile, long-press paste is the main path and interference is amplified. Password managers and OTP autofill also travel the paste channel; a mask may clip a one-time code to its first cells. Formatting only on blur removes mask cells during typing and with them the paste fight—but that is no longer a during-input mask. IME composition characters can be dropped as illegal keys; mid-string edits under Chinese and Japanese input methods get worse.

Applying it

  • On paste, strip or recognize existing separators and fill cells in one pass; do not collide the source string character-by-character with mask furniture.
  • When arrows and backspace skip a separator, still delete the previous significant character; do not park the caret on an uneditable dash.
  • If the clipboard is too long, truncate visibly and say so; do not drop the tail in silence.
  • Verify by pasting a hyphenated number from contacts, a spaced card number from mail, and clicking into the middle to change one digit. Any shifted result or vanished caret is a caret/paste bug, not a reason to add “please don’t paste.”

Related

  • Within the group: E2.07.1 A mask that inserts separators reduces typing load · E2.07.3 A mask must not forbid legal format variants
  • Adjacent: E2.09 Password fields · E2.16 Autocomplete dropdowns
  • Search terms: mask caret and paste interference · input mask caret · clipboard

Cards in the same group

Quick Actions

Share

Share this page

ios_share

https://hci.top/en/handbook/E2.07.2