Commit e45ea88
authored
🤖 fix: prevent new workspace modal from closing on outside click (#65)
## 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`_1 parent ec7efb5 commit e45ea88
1 file changed
+2
-2
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
201 | 201 | | |
202 | 202 | | |
203 | 203 | | |
204 | | - | |
205 | | - | |
| 204 | + | |
| 205 | + | |
206 | 206 | | |
207 | 207 | | |
208 | 208 | | |
| |||
0 commit comments