summaryrefslogtreecommitdiff
path: root/web-ui/app/js/search/search_trigger.js
diff options
context:
space:
mode:
Diffstat (limited to 'web-ui/app/js/search/search_trigger.js')
-rw-r--r--web-ui/app/js/search/search_trigger.js5
1 files changed, 5 insertions, 0 deletions
diff --git a/web-ui/app/js/search/search_trigger.js b/web-ui/app/js/search/search_trigger.js
index 4b9cb1dc..cb670239 100644
--- a/web-ui/app/js/search/search_trigger.js
+++ b/web-ui/app/js/search/search_trigger.js
@@ -68,6 +68,10 @@ define(
}
};
+ this.shortcutFocusSearchField = function() {
+ this.$node.find('input[type=search]').focus();
+ };
+
this.after('initialize', function () {
this.render();
this.on(this.select('form'), 'submit', this.search);
@@ -75,6 +79,7 @@ define(
this.on(this.select('input'), 'blur', this.showSearchTermsAndPlaceHolder);
this.on(document, events.ui.tag.selected, this.clearInput);
this.on(document, events.ui.tag.select, this.clearInput);
+ this.on(document, events.shortcuts.focusSearchField, this.shortcutFocusSearchField);
});
}
}