Skip to content

Environments map machine search clears on IME Escape and closes Settings on held Escape #43621

Done

Description

@AymanKhan9

Bug

In Settings -> Environments map (apps/web/src/components/settings/EnvironmentsMap.tsx), the "Find a machine" search input has three Escape/IME issues compared to the sibling stack filter in EnvironmentsMapDetails.tsx (fixed in #43149):

  1. It uses native type="search", which clears the field on Escape even during IME composition.
  2. Its onKeyDown handler does not ignore IME composition (isComposing || keyCode === 229), so pressing Escape during composition clears the query and pressing Enter during composition triggers goToFirstMatch().
  3. Holding Escape clears the query on the first keydown and then lets repeated Escape keydowns (event.repeat) propagate and close Settings.

Expected behavior

Match EnvironmentsMapDetails.tsx (#43149) and AddProjectToMachineDialog.tsx (#43559): use type="text" role="searchbox" enterKeyHint="search", ignore Enter/Escape actions during IME composition (stopping Escape propagation so Settings stays open), and prevent repeated Escape keydowns from closing Settings while still allowing a plain Escape on an empty query to close Settings.

Activity

  1. 2SinceJuly commented on Nov 26, 2026

    @2SinceJuly
    Contributor

    Opened #43684 for this. It follows the stack filter (#43149) and the ignored-file search (#43559): the input becomes a role="searchbox" text field, and Enter/Escape that belong to an IME are left to the IME.

    One correction from reproducing it on main (44a5333786): the first two items reproduce — a composed Escape empties the query and, after that, the same Escape bubbles to the modal and closes Settings; a composed Enter jumps to the first match. The third did not: AppRouteModal already cancels held escape-key repeats, and a repeated Escape on this input leaves Settings open. The PR guards against repeats anyway, but credits that to the modal rather than claiming a separate fix.

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

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions