mirror of
https://github.com/siteboon/claudecodeui.git
synced 2026-07-06 13:42:58 +08:00
fix(git=panel): escape now works for closing new branch modal
This commit is contained in:
@@ -70,7 +70,16 @@ export default function NewBranchModal({
|
|||||||
onChange={(event) => setNewBranchName(event.target.value)}
|
onChange={(event) => setNewBranchName(event.target.value)}
|
||||||
onKeyDown={(event) => {
|
onKeyDown={(event) => {
|
||||||
if (event.key === 'Enter' && !isCreatingBranch) {
|
if (event.key === 'Enter' && !isCreatingBranch) {
|
||||||
|
event.preventDefault();
|
||||||
|
event.stopPropagation();
|
||||||
void handleCreateBranch();
|
void handleCreateBranch();
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
if (event.key === 'Escape' && !isCreatingBranch) {
|
||||||
|
event.preventDefault();
|
||||||
|
event.stopPropagation();
|
||||||
|
onClose();
|
||||||
}
|
}
|
||||||
}}
|
}}
|
||||||
placeholder="feature/new-feature"
|
placeholder="feature/new-feature"
|
||||||
|
|||||||
Reference in New Issue
Block a user