summaryrefslogtreecommitdiffstats
path: root/apps/files_sharing
diff options
context:
space:
mode:
authorChristopher Ng <chrng8@gmail.com>2023-03-01 17:18:39 -0800
committerChristopher Ng <chrng8@gmail.com>2023-03-01 17:18:39 -0800
commit0c69619d914a5952785336b45e0a005c7ba3177d (patch)
treed95a86a5d8674cae35bfc201dfa1578e0d5b9089 /apps/files_sharing
parent2564d7f4d1348baa4ec17dfa9ffc9b96cc826b06 (diff)
downloadnextcloud-server-0c69619d914a5952785336b45e0a005c7ba3177d.tar.gz
nextcloud-server-0c69619d914a5952785336b45e0a005c7ba3177d.zip
Fix share select dropdown not opening when viewer is open
Signed-off-by: Christopher Ng <chrng8@gmail.com>
Diffstat (limited to 'apps/files_sharing')
-rw-r--r--apps/files_sharing/src/components/SharingInput.vue7
1 files changed, 7 insertions, 0 deletions
diff --git a/apps/files_sharing/src/components/SharingInput.vue b/apps/files_sharing/src/components/SharingInput.vue
index 46c495d8279..8dadb4689ff 100644
--- a/apps/files_sharing/src/components/SharingInput.vue
+++ b/apps/files_sharing/src/components/SharingInput.vue
@@ -34,6 +34,7 @@
:user-select="true"
:options="options"
v-model="value"
+ @open="handleOpen"
@search="asyncFind"
@option:selected="addShare">
<template #no-options="{ search }">
@@ -46,6 +47,7 @@
<script>
import { generateOcsUrl } from '@nextcloud/router'
import { getCurrentUser } from '@nextcloud/auth'
+import { emit } from '@nextcloud/event-bus'
import axios from '@nextcloud/axios'
import debounce from 'debounce'
import NcSelect from '@nextcloud/vue/dist/Components/NcSelect.js'
@@ -153,6 +155,11 @@ export default {
},
methods: {
+ handleOpen() {
+ // Fix dropdown not opening when viewer is open, see https://github.com/nextcloud/viewer/pull/1319
+ emit('viewer:trapElements:changed', this.$refs.select.$el)
+ },
+
async asyncFind(query) {
// save current query to check if we display
// recommendations or search results