Skip to content

Pressing enter on confirmation modal deletes the entry even if cancel is focused #16717

@gtsiolis

Description

@gtsiolis

Bug description

The confirmation modal for workspaces, variables, projects, SSH keys, and everywhere used in the dashboard, deletes the entry when pressing ENTER even if cancel is focused by default.

Steps to reproduce

  1. Open a new workspace.
  2. From the workspace more actions menu, select DELETE and when the confirmation modal press ENTER.
  3. Notice that even if CANCEL was focused by default, the workspace is deleted

Workspace affected

No response

Expected behavior

No response

Example repository

No response

Anything else?

In case it helps, here's the component used under the hood:

export default function ConfirmationModal(props: {

Cc @selfcontained @easyCZ because #16592 recently edited this file and could be related.

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions