Skip to content
Snippets Groups Projects
Commit 1286dee1 authored by syuilo's avatar syuilo
Browse files

fix context menu

parent fee953b0
No related branches found
No related tags found
No related merge requests found
......@@ -17,7 +17,7 @@
@dragenter="onDragenter"
@dragleave="onDragleave"
@drop.prevent.stop="onDrop"
@contextmenu="onContextmenu"
@contextmenu.stop="onContextmenu"
>
<div class="contents" ref="contents">
<div class="folders" ref="foldersContainer" v-show="folders.length > 0">
......
......@@ -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',
......
......@@ -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',
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment