mirror of
https://github.com/nextcloud/server.git
synced 2026-03-19 17:13:56 -04:00
fix: FileEntry boundariesElement and right click menu
Signed-off-by: John Molakvoæ <skjnldsv@protonmail.com>
This commit is contained in:
parent
28725c46a8
commit
267cea8153
1 changed files with 12 additions and 7 deletions
|
|
@ -21,7 +21,7 @@
|
|||
-->
|
||||
|
||||
<template>
|
||||
<tr :class="{'list__row--active': active}" class="list__row">
|
||||
<tr :class="{'list__row--active': active}" class="list__row" @contextmenu="onRightClick">
|
||||
<span v-if="source.attributes.failed" class="files-list__row--failed" />
|
||||
|
||||
<td class="files-list__row-checkbox">
|
||||
|
|
@ -100,8 +100,8 @@
|
|||
<!-- Menu actions -->
|
||||
<NcActions v-if="active"
|
||||
ref="actionsMenu"
|
||||
:boundaries-element="boundariesElement"
|
||||
:container="boundariesElement"
|
||||
:boundaries-element="getBoundariesElement()"
|
||||
:container="getBoundariesElement()"
|
||||
:disabled="source._loading"
|
||||
:force-name="true"
|
||||
:force-menu="enabledInlineActions.length === 0 /* forceMenu only if no inline actions */"
|
||||
|
|
@ -259,7 +259,6 @@ export default Vue.extend({
|
|||
return {
|
||||
backgroundFailed: false,
|
||||
backgroundImage: '',
|
||||
boundariesElement: document.querySelector('.app-content > .files-list'),
|
||||
loading: '',
|
||||
}
|
||||
},
|
||||
|
|
@ -508,9 +507,6 @@ export default Vue.extend({
|
|||
|
||||
// Fetch the preview on init
|
||||
this.debounceIfNotCached()
|
||||
|
||||
// Right click watcher on tr
|
||||
this.$el.parentNode?.addEventListener?.('contextmenu', this.onRightClick)
|
||||
},
|
||||
|
||||
beforeDestroy() {
|
||||
|
|
@ -814,6 +810,15 @@ export default Vue.extend({
|
|||
}
|
||||
},
|
||||
|
||||
/**
|
||||
* Making this a function in case the files-list
|
||||
* reference changes in the future. That way we're
|
||||
* sure there is one at the time we call it.
|
||||
*/
|
||||
getBoundariesElement() {
|
||||
return document.querySelector('.app-content > .files-list')
|
||||
},
|
||||
|
||||
t: translate,
|
||||
formatFileSize,
|
||||
},
|
||||
|
|
|
|||
Loading…
Reference in a new issue