Skip to content

iOS keyboard dismiss presses a "Done" return key and submits the form #4640

Closed

Description

@thymikee

Purpose

keyboard dismiss must never press the keyboard's return key. On iOS it now treats a key labelled "Done" as the keyboard's dismiss key. When that key is the return key, pressing it fires the app's onSubmitEditing, and a form submits. This breaks the command's contract that dismissing is side-effect-free. Expo Explore hit it: a "close the keyboard" step created an account (expo/explore#88).

Observed (0.21.39, iPhone Air simulator, iOS 27.0, Wallet example sign-up)

Focus is in the password field, whose returnKeyType is "done" and whose onSubmitEditing submits.

// keyboard status
{ "visible": true, "returnKey": "done", "returnKeyLabel": "done" }
// keyboard dismiss
{ "dismissed": true, "mechanism": "dismissKey", "message": "Keyboard dismissed via its dismiss key" }

The app then shows Home: the form submitted. With the focus in the name field (returnKey: "next"), dismiss correctly refuses with keyboard_dismiss_unavailable.

Required behavior

  • Excluded key: the dismiss-key lookup must exclude the key that keyboard status identifies as the return key, whatever its label: done, go, send, search, join, and so on. One owner should decide "this key is the return key" for both status and dismiss.
  • Refusal: with no other dismiss key, dismiss refuses with keyboard_dismiss_unavailable and dispatched: "no", as on the name field.
  • Real dismiss keys still work: the iPad keyboard-hide key, and a "Done" in an input accessory toolbar above the keys, if the runner classifies that one as a dismiss key today. Decide from evidence, and document it in help.

Done when

  • On the reproduction above, keyboard dismiss refuses and the form does not submit, verified on a simulator.
  • Runner unit tests cover a "Done" return key (excluded) and a real dismiss key (pressed).
  • The keyboard help states that dismiss never presses the return key, and keyboard enter / keyboard return remain the way to submit.

Activity

  1. apex-sentinel-staging commented on Nov 17, 2026

    @apex-sentinel-staging

    Apex Sentinel · Issue review

    Suggested label: bug

    The report describes existing keyboard-dismiss behavior on iOS incorrectly treating a return key labeled "Done" as a dismiss key, causing onSubmitEditing and unintended form submission, with concrete repro data and an exact fix scope for excluding return keys from dismiss-key lookup.

    Required sections

    • Steps to reproduce (missing)
    • Expected and actual behavior (missing)
    • Version or environment (missing)
  2. added a commit that references this issue on Nov 17, 2026
    4dcc351
  3. added
    bug
    on Nov 18, 2026
  4. added a commit that references this issue on Nov 18, 2026
    eec775c
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    bug

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions