Skip to content

Conversation

@ibetitsmike
Copy link
Contributor

Changes

Fixes the new workspace modal behavior so it only closes via explicit user actions (Cancel button, Create Workspace button, or Escape key), not by clicking outside the modal.

Problem

Previously, clicking anywhere on the overlay (dark background) would close the modal, which could lead to accidental dismissal when users are filling out the form.

Solution

Removed:

  • onClick={handleCancel} from ModalOverlay
  • onClick={(e) => e.stopPropagation()} from ModalContent

The modal now only closes through:

  1. Clicking the Cancel button
  2. Clicking Create Workspace (after successful creation)
  3. Pressing Escape key (via existing keybind handler)

Testing

Manual testing needed:

  1. Open the new workspace modal
  2. Click outside the modal (on the overlay) - should NOT close
  3. Click Cancel - should close
  4. Open modal again and press Escape - should close
  5. Create a workspace successfully - should close

Generated with cmux

The modal was closing when clicking anywhere on the overlay (dark background).
This was not the expected behavior - users should only be able to close the
modal via:
- Clicking the Cancel button
- Clicking Create Workspace after creation
- Pressing Escape key

Removed onClick handler from ModalOverlay and stopPropagation from ModalContent
to prevent accidental modal dismissal.

Generated with `cmux`
@ibetitsmike ibetitsmike merged commit e45ea88 into main Oct 7, 2025
6 checks passed
@ibetitsmike ibetitsmike deleted the create-workspace-ux-improvement branch October 7, 2025 10:57
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant