Submit must work with both Enter and a button
Aliases: search submit button · Enter to search · missing search button
What it is
Search is an explicit submit: the query is composed and someone wants it sent. Keyboard users’ habitual act is Enter; touch and pointer users’ habitual act is a button. Implement only one, and the other group stalls at “I typed it—now what?” Dual search submit makes Enter and a visible button share one send path. The issue is how the query is issued, not which domain it searches, and not how the slot is cleared afterward.
Why it happens
Enter is the default “done” key in a single-line field; desktop search has trained it into a reflex. On touch, the software keyboard’s return key sometimes reads “next” or is owned by the IME, the reflex breaks, and people hunt outside the slot for a magnifying-glass target. With no visible button, touch users treat the slot as a live filter that still needs another click; with no Enter handler, keyboard users mash the key and then click empty page. Both paths must hit the same request and the same checks (empty, too short), or one side searches and the other shows a different error. When a suggestion list is open, Enter may mean “take the highlighted item”; the button should still mean “search what I typed.” The two paths may split at that moment, but the split must be stable.
Where it stops holding
Live-filtering lists (every key already sifts) have no separate submit; Enter and a button become surplus or “confirm the focused row.” Voice search sends on end-of-speech; a button can remain for a corrected resend. Enter during IME composition commits the syllable, not the search; the next Enter after composition ends is the search, or Chinese users will submit half a pinyin string. Switch users may be unable to hit a tiny magnifying glass or to send Enter; they need a larger submit target outside the slot.
Applying it
- Bind both Enter and a visible submit (magnifying glass or “Search”) to the same request.
- Separate IME composition-end from true submit; Enter during composition must not issue a query.
- When suggestions are open, Enter may accept the current candidate, but the button should still search the raw slot text, and its name should say so.
- Verify with keyboard-only Enter, pointer-only button, and Enter during Chinese composition. The three paths should send / send / not submit half a pinyin. Missing any one, dual submit does not hold.