From 1286dee1ab299a0e98cd252e5f2fa030fad07496 Mon Sep 17 00:00:00 2001 From: syuilo Date: Mon, 11 Jan 2021 18:49:39 +0900 Subject: [PATCH] fix context menu --- src/client/components/drive.vue | 2 +- src/client/ui/deck/main-column.vue | 1 + src/client/ui/default.vue | 1 + 3 files changed, 3 insertions(+), 1 deletion(-) diff --git a/src/client/components/drive.vue b/src/client/components/drive.vue index 64e4d51e23..1dbb1cbc16 100644 --- a/src/client/components/drive.vue +++ b/src/client/components/drive.vue @@ -17,7 +17,7 @@ @dragenter="onDragenter" @dragleave="onDragleave" @drop.prevent.stop="onDrop" - @contextmenu="onContextmenu" + @contextmenu.stop="onContextmenu" >
diff --git a/src/client/ui/deck/main-column.vue b/src/client/ui/deck/main-column.vue index c09880d68a..f0d5567b6e 100644 --- a/src/client/ui/deck/main-column.vue +++ b/src/client/ui/deck/main-column.vue @@ -58,6 +58,7 @@ export default defineComponent({ onContextmenu(e) { if (['INPUT', 'TEXTAREA'].includes(e.target.tagName) || e.target.attributes['contenteditable']) return; + if (window.getSelection().toString() !== '') return; const path = this.$route.path; os.contextMenu([{ type: 'label', diff --git a/src/client/ui/default.vue b/src/client/ui/default.vue index 0da4108209..7626ddaa58 100644 --- a/src/client/ui/default.vue +++ b/src/client/ui/default.vue @@ -188,6 +188,7 @@ export default defineComponent({ onContextmenu(e) { if (['INPUT', 'TEXTAREA'].includes(e.target.tagName) || e.target.attributes['contenteditable']) return; + if (window.getSelection().toString() !== '') return; const path = this.$route.path; os.contextMenu([{ type: 'label',