From 5ce78d041d50f48aca2db852c1cce632255d9747 Mon Sep 17 00:00:00 2001 From: Alain Nussbaumer Date: Sat, 20 Apr 2024 22:20:50 +0200 Subject: [PATCH] [web] Remove blanks in the search query before launching a search --- web-src/src/pages/PageSearchLibrary.vue | 1 + web-src/src/pages/PageSearchSpotify.vue | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/web-src/src/pages/PageSearchLibrary.vue b/web-src/src/pages/PageSearchLibrary.vue index 2b08554a..747bdbaa 100644 --- a/web-src/src/pages/PageSearchLibrary.vue +++ b/web-src/src/pages/PageSearchLibrary.vue @@ -177,6 +177,7 @@ export default { this.search_types = SEARCH_TYPES this.search_limit = PAGE_SIZE } + this.search_query = this.search_query.trim() if (!this.search_query || !this.search_query.replace(/^query:/u, '')) { this.$refs.search_field.focus() return diff --git a/web-src/src/pages/PageSearchSpotify.vue b/web-src/src/pages/PageSearchSpotify.vue index 9ac8fbc7..b43ec77a 100644 --- a/web-src/src/pages/PageSearchSpotify.vue +++ b/web-src/src/pages/PageSearchSpotify.vue @@ -144,7 +144,6 @@ export default { this.search_types = [type] this.search_parameters.limit = PAGE_SIZE_EXPANDED this.search_parameters.offset = 0 - this.search() }, open_search(query) { @@ -168,6 +167,7 @@ export default { this.search_types = SEARCH_TYPES this.search_parameters.limit = PAGE_SIZE } + this.search_query = this.search_query.trim() if (!this.search_query) { this.$refs.search_field.focus() return