fix(git=panel): escape now works for closing new branch modal

This commit is contained in:
Haileyesus
2026-02-24 14:02:40 +03:00
parent af283e7dfd
commit f59f40d0f9

View File

@@ -70,7 +70,16 @@ export default function NewBranchModal({
onChange={(event) => setNewBranchName(event.target.value)}
onKeyDown={(event) => {
if (event.key === 'Enter' && !isCreatingBranch) {
event.preventDefault();
event.stopPropagation();
void handleCreateBranch();
return;
}
if (event.key === 'Escape' && !isCreatingBranch) {
event.preventDefault();
event.stopPropagation();
onClose();
}
}}
placeholder="feature/new-feature"