diff options
author | Phil Hughes <me@iamphill.com> | 2018-04-12 16:08:02 +0100 |
---|---|---|
committer | Phil Hughes <me@iamphill.com> | 2018-04-16 09:48:59 +0100 |
commit | 71b80a11fe8dbe88aa0cfd8c648b4618d3488b1f (patch) | |
tree | 1c906a2d869179e8473e9b7a93ab620cff4529b6 /app/assets/javascripts/ide/components/file_finder | |
parent | b0d84c1e0e4c9959fbca7beecdfec5ede1c33960 (diff) | |
download | gitlab-ce-71b80a11fe8dbe88aa0cfd8c648b4618d3488b1f.tar.gz |
added specs
order initial dropdown by lastOpenedAt date
Diffstat (limited to 'app/assets/javascripts/ide/components/file_finder')
-rw-r--r-- | app/assets/javascripts/ide/components/file_finder/index.vue | 15 |
1 files changed, 12 insertions, 3 deletions
diff --git a/app/assets/javascripts/ide/components/file_finder/index.vue b/app/assets/javascripts/ide/components/file_finder/index.vue index 1568f1bf9e4..5049588e0a4 100644 --- a/app/assets/javascripts/ide/components/file_finder/index.vue +++ b/app/assets/javascripts/ide/components/file_finder/index.vue @@ -50,6 +50,7 @@ export default { this.searchText = ''; } else { this.focusedIndex = 0; + this.$refs.searchInput.focus(); } }); @@ -65,12 +66,20 @@ export default { case 38: // UP e.preventDefault(); - if (this.focusedIndex > 0) this.focusedIndex -= 1; + if (this.focusedIndex > 0) { + this.focusedIndex -= 1; + } else { + this.focusedIndex = this.filteredBlobsLength - 1; + } break; case 40: // DOWN e.preventDefault(); - if (this.focusedIndex < this.filteredBlobsLength - 1) this.focusedIndex += 1; + if (this.focusedIndex < this.filteredBlobsLength - 1) { + this.focusedIndex += 1; + } else { + this.focusedIndex = 0; + } break; default: break; @@ -146,7 +155,7 @@ export default { v-else class="dropdown-menu-empty-itemhidden" > - <a href=""> + <a href="#"> <template v-if="loading"> {{ __('Loading...') }} </template> |