mirror of
https://activitypub.software/TransFem-org/Sharkey
synced 2024-11-22 14:05:12 +00:00
fix context menu
This commit is contained in:
parent
fee953b0df
commit
1286dee1ab
3 changed files with 3 additions and 1 deletions
|
@ -17,7 +17,7 @@
|
||||||
@dragenter="onDragenter"
|
@dragenter="onDragenter"
|
||||||
@dragleave="onDragleave"
|
@dragleave="onDragleave"
|
||||||
@drop.prevent.stop="onDrop"
|
@drop.prevent.stop="onDrop"
|
||||||
@contextmenu="onContextmenu"
|
@contextmenu.stop="onContextmenu"
|
||||||
>
|
>
|
||||||
<div class="contents" ref="contents">
|
<div class="contents" ref="contents">
|
||||||
<div class="folders" ref="foldersContainer" v-show="folders.length > 0">
|
<div class="folders" ref="foldersContainer" v-show="folders.length > 0">
|
||||||
|
|
|
@ -58,6 +58,7 @@ export default defineComponent({
|
||||||
|
|
||||||
onContextmenu(e) {
|
onContextmenu(e) {
|
||||||
if (['INPUT', 'TEXTAREA'].includes(e.target.tagName) || e.target.attributes['contenteditable']) return;
|
if (['INPUT', 'TEXTAREA'].includes(e.target.tagName) || e.target.attributes['contenteditable']) return;
|
||||||
|
if (window.getSelection().toString() !== '') return;
|
||||||
const path = this.$route.path;
|
const path = this.$route.path;
|
||||||
os.contextMenu([{
|
os.contextMenu([{
|
||||||
type: 'label',
|
type: 'label',
|
||||||
|
|
|
@ -188,6 +188,7 @@ export default defineComponent({
|
||||||
|
|
||||||
onContextmenu(e) {
|
onContextmenu(e) {
|
||||||
if (['INPUT', 'TEXTAREA'].includes(e.target.tagName) || e.target.attributes['contenteditable']) return;
|
if (['INPUT', 'TEXTAREA'].includes(e.target.tagName) || e.target.attributes['contenteditable']) return;
|
||||||
|
if (window.getSelection().toString() !== '') return;
|
||||||
const path = this.$route.path;
|
const path = this.$route.path;
|
||||||
os.contextMenu([{
|
os.contextMenu([{
|
||||||
type: 'label',
|
type: 'label',
|
||||||
|
|
Loading…
Reference in a new issue