summaryrefslogtreecommitdiff
path: root/app/assets/javascripts/ide/components/file_finder
diff options
context:
space:
mode:
authorPhil Hughes <me@iamphill.com>2018-04-12 16:08:02 +0100
committerPhil Hughes <me@iamphill.com>2018-04-16 09:48:59 +0100
commit71b80a11fe8dbe88aa0cfd8c648b4618d3488b1f (patch)
tree1c906a2d869179e8473e9b7a93ab620cff4529b6 /app/assets/javascripts/ide/components/file_finder
parentb0d84c1e0e4c9959fbca7beecdfec5ede1c33960 (diff)
downloadgitlab-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.vue15
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>