FEATURE: enter on search will take you to full page search

This commit is contained in:
Sam 2015-06-26 17:37:48 +10:00
parent 1408563a7f
commit 93b5af716c

View File

@ -2,5 +2,11 @@ export default Discourse.View.extend({
tagName: 'div',
classNames: ['d-dropdown'],
elementId: 'search-dropdown',
templateName: 'search'
templateName: 'search',
keyDown: function(e){
var term = this.get('controller.term');
if (e.which === 13 && term && term.length > 2) {
this.get('controller').send('moreOfType', 'topic');
}
}
});