From dde01c6931e8c21a8a3738eb5fc3cd4419f09199 Mon Sep 17 00:00:00 2001 From: Henrique Dias Date: Thu, 27 Jul 2017 14:03:14 +0100 Subject: [PATCH] Make search reload the dir after closing itself Former-commit-id: e9774417ce7c29eded0158ef18535fcad57ddc8a [formerly 1a644e3fd8e191aee49a12a660069b39b38e2c0b] [formerly c371da590eb27fbcf290e56933b279ea75384cee [formerly 9453e22559d0eec8e7887b4a2dce31df4769622c]] Former-commit-id: aba05b88f61352b6e6afb5bf9af8c033ac8ba310 [formerly d011d5ee10fa055bc3ea35889dddb968b476eb83] Former-commit-id: c1138ce78249872f442646d26807140a94824e0b --- assets/src/components/Search.vue | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/assets/src/components/Search.vue b/assets/src/components/Search.vue index cf4308e7..369d2b59 100644 --- a/assets/src/components/Search.vue +++ b/assets/src/components/Search.vue @@ -47,7 +47,8 @@ export default { ongoing: false, scrollable: null, search: [], - commands: [] + commands: [], + reload: false } }, watch: { @@ -57,12 +58,17 @@ export default { // If the hover was search and now it's something else // we should blur the input. if (old === 'search' && val !== 'search') { + if (this.reload) { + this.$store.commit('setReload', true) + } + this.$refs.input.blur() } // If we are starting to show the search box, we should // focus the input. if (val === 'search') { + this.reload = false this.$refs.input.focus() } } @@ -166,9 +172,9 @@ export default { this.scrollable.scrollTop = this.scrollable.scrollHeight }, (event) => { + this.reload = true this.ongoing = false this.scrollable.scrollTop = this.scrollable.scrollHeight - this.$store.commit('setReload', true) } )