Skip to content

Commit

Permalink
Fix share select dropdown not opening when viewer is open
Browse files Browse the repository at this point in the history
Signed-off-by: Christopher Ng <chrng8@gmail.com>
  • Loading branch information
Pytal authored and backportbot-nextcloud[bot] committed Mar 2, 2023
1 parent c92fd66 commit b05f1db
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions apps/files_sharing/src/components/SharingInput.vue
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,7 @@
:user-select="true"
:options="options"
v-model="value"
@open="handleOpen"
@search="asyncFind"
@option:selected="addShare">
<template #no-options="{ search }">
Expand All @@ -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'
Expand Down Expand Up @@ -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
Expand Down

0 comments on commit b05f1db

Please sign in to comment.