From 075bb5f6c571ea4b0577ab35845dc78f94d36d20 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?John=20Molakvo=C3=A6?= Date: Tue, 16 May 2023 11:42:12 +0200 Subject: [PATCH] fix(search): fix load more MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: John Molakvoæ --- core/src/views/UnifiedSearch.vue | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/core/src/views/UnifiedSearch.vue b/core/src/views/UnifiedSearch.vue index 62b5d034038..53b0fe8adbd 100644 --- a/core/src/views/UnifiedSearch.vue +++ b/core/src/views/UnifiedSearch.vue @@ -145,7 +145,7 @@ ? t('core', 'Loading more results …') : t('core', 'Load more results')" :icon-class="loading[type] ? 'icon-loading-small' : ''" - @click.stop="loadMore(type)" + @click.prevent.stop="loadMore(type)" @focus="setFocusedIndex" /> @@ -335,13 +335,13 @@ export default { }, async created() { - subscribe('files:navigation:changed', this.resetForm) + subscribe('files:navigation:changed', this.onNavigationChange) this.types = await getTypes() this.logger.debug('Unified Search initialized with the following providers', this.types) }, beforeDestroy() { - unsubscribe('files:navigation:changed', this.resetForm) + unsubscribe('files:navigation:changed', this.onNavigationChange) }, mounted() { @@ -380,7 +380,7 @@ export default { emit('nextcloud:unified-search.close') }, - resetForm() { + onNavigationChange() { this.$el.querySelector('form[role="search"]').reset() },