summaryrefslogtreecommitdiff
path: root/app/assets/javascripts/droplab
diff options
context:
space:
mode:
authorClement Ho <ClemMakesApps@gmail.com>2017-01-11 20:47:42 -0500
committerClement Ho <ClemMakesApps@gmail.com>2017-01-11 20:47:42 -0500
commitce9d3ee599f816ba20d57eae16b4139cabecdb1a (patch)
tree94f4dcb6a96a0a6853d6fb91c64930ac75b20be6 /app/assets/javascripts/droplab
parent044a195b1e8ca854e67f8e2782bc69c345bf0df6 (diff)
downloadgitlab-ce-ce9d3ee599f816ba20d57eae16b4139cabecdb1a.tar.gz
Backend review
Diffstat (limited to 'app/assets/javascripts/droplab')
-rw-r--r--app/assets/javascripts/droplab/droplab_ajax_filter.js9
1 files changed, 3 insertions, 6 deletions
diff --git a/app/assets/javascripts/droplab/droplab_ajax_filter.js b/app/assets/javascripts/droplab/droplab_ajax_filter.js
index ae316f881c8..af163f76851 100644
--- a/app/assets/javascripts/droplab/droplab_ajax_filter.js
+++ b/app/assets/javascripts/droplab/droplab_ajax_filter.js
@@ -22,7 +22,8 @@ require('../window')(function(w){
debounceTrigger: function debounceTrigger(e) {
var NON_CHARACTER_KEYS = [16, 17, 18, 20, 37, 38, 39, 40, 91, 93];
var invalidKeyPressed = NON_CHARACTER_KEYS.indexOf(e.detail.which || e.detail.keyCode) > -1;
- var focusEvent = false;
+ var focusEvent = e.type === 'focus';
+
if (invalidKeyPressed || this.loading) {
return;
}
@@ -31,10 +32,6 @@ require('../window')(function(w){
clearTimeout(this.timeout);
}
- if (e.type === 'focus') {
- focusEvent = true;
- }
-
this.timeout = setTimeout(this.trigger.bind(this, focusEvent), 200);
},
@@ -66,7 +63,7 @@ require('../window')(function(w){
searchValue = '';
}
- if (searchValue === config.searchKey) {
+ if (config.searchKey === searchValue) {
return this.list.show();
}