diff --git a/gitbutler-ui/src/lib/components/FileContextMenu.svelte b/gitbutler-ui/src/lib/components/FileContextMenu.svelte index 3ebd6d962..6b94697e9 100644 --- a/gitbutler-ui/src/lib/components/FileContextMenu.svelte +++ b/gitbutler-ui/src/lib/components/FileContextMenu.svelte @@ -21,14 +21,20 @@ } - + {#if item.files !== undefined} {#if containsBinaryFiles(item)} {:else} - confirmationModal.show(item)} /> + { + confirmationModal.show(item); + dismiss(); + }} + /> {/if} {/if} diff --git a/gitbutler-ui/src/lib/components/HunkContextMenu.svelte b/gitbutler-ui/src/lib/components/HunkContextMenu.svelte index d18ff123b..d854ebef9 100644 --- a/gitbutler-ui/src/lib/components/HunkContextMenu.svelte +++ b/gitbutler-ui/src/lib/components/HunkContextMenu.svelte @@ -16,17 +16,25 @@ } - + {#if item.hunk !== undefined} - branchController.unapplyHunk(item.hunk)} /> + { + branchController.unapplyHunk(item.hunk); + dismiss(); + }} + /> {/if} {#if item.lineNumber} - projectPath && open(`vscode://file${projectPath}/${filePath}:${item.lineNumber}`)} + on:click={() => { + projectPath && open(`vscode://file${projectPath}/${filePath}:${item.lineNumber}`); + dismiss(); + }} /> {/if} diff --git a/gitbutler-ui/src/lib/components/PopupMenu.svelte b/gitbutler-ui/src/lib/components/PopupMenu.svelte index f1d772771..280c7b8f5 100644 --- a/gitbutler-ui/src/lib/components/PopupMenu.svelte +++ b/gitbutler-ui/src/lib/components/PopupMenu.svelte @@ -55,7 +55,7 @@ use:clickOutside={{ handler: () => onDismiss() }} style="position: absolute; top:{pos.y}px; left:{pos.x}px" > - + {/if}