E2.17.2undoable field cleardesign

Clearing should be undoable

Aliases: accidental clear · restore after clear · undo stack

What it is

One tap empties a slot that may hold a long value. If a miss leaves nothing on the clipboard or in the undo stack, the content is gone. An undoable field clear requires that this delete can be recovered through system undo, or at least that the old value sits in an explicit Restore. The issue is whether a wipe can come back, not when the cross appears, and not how much of the right side it occupies.

Why it happens

Clear’s damage scales with length: an address, a bio, an unsubmitted long note—one miss equals closing without save. Browsers sometimes treat clear as an ordinary edit on input, so undo brings it back; some implementations assign value="" in script and leave no undo record. Mobile has no reliable system undo, so a miss costs more. Intent behind the cross is not always “I don’t want this”—sometimes it is “clear autofill so I can type,” sometimes a miss. With no rollback, the only path is to write from scratch. That is the same memory protection as reversible destructive actions, sitting on a small cross.

Where it stops holding

Secrets meant to be destroyed (a one-time code already revealed) should not remain in undo, lest the next person recover them. If the slot is emptied but a draft autosaves elsewhere, a failed in-slot undo can still recover from the draft—if people know where the draft lives. In a collaborative field, clear affects a value others are watching; undo semantics belong to the data layer, not to the widget alone. An empty slot should not have a clear, so undo has no object.

Applying it

  • Put clear on the editor’s undo stack so the system undo shortcut restores the value just wiped.
  • On mobile, offer Restore briefly after clear, or keep the old value in memory until the next edit.
  • Do not write empty in script while bypassing input events; that drops the undo record.
  • Verify by filling text you would not want to retype, tapping clear, and undoing at once. The value should return. Repeat on a phone and see whether Restore exists within a few seconds. If scripted clear makes undo a no-op, fix the implementation rather than adding “please tap carefully.”

Related

  • Within the group: E2.17.1 Show the clear control only when there is content · E2.17.3 The clear control occupies the right side of the slot
  • Adjacent: E2.08 Character limits · E6.05 Confirmation dialogs
  • Search terms: undoable field clear · accidental clear · undo stack

Cards in the same group

Quick Actions

Share

Share this page

ios_share

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