mirror of
https://github.com/codeninjasllc/discourse.git
synced 2024-11-27 17:46:05 -05:00
FIX: Remove up/down key bindings for search results
Up/down key bindings make it difficult to access Show More on search results. https://meta.discourse.org/t/keyboard-users-cant-select-show-more-in-search-results/19394
This commit is contained in:
parent
3e7084743c
commit
0784c52a24
2 changed files with 1 additions and 25 deletions
|
@ -3,7 +3,6 @@ export default Ember.CollectionView.extend({
|
|||
itemViewClass: Discourse.GroupedView.extend({
|
||||
tagName: 'li',
|
||||
classNameBindings: ['selected'],
|
||||
templateName: Discourse.computed.fmt('parentView.type', "search/%@_result"),
|
||||
selected: Discourse.computed.propertyEqual('content.index', 'controller.selectedIndex')
|
||||
templateName: Discourse.computed.fmt('parentView.type', "search/%@_result")
|
||||
})
|
||||
});
|
||||
|
|
|
@ -3,27 +3,4 @@ export default Discourse.View.extend({
|
|||
classNames: ['d-dropdown'],
|
||||
elementId: 'search-dropdown',
|
||||
templateName: 'search'
|
||||
|
||||
// didInsertElement: function() {
|
||||
// // Delegate ESC to the composer
|
||||
// var controller = this.get('controller');
|
||||
// return $('body').on('keydown.search', function(e) {
|
||||
// if ($('#search-dropdown').is(':visible')) {
|
||||
// switch (e.which) {
|
||||
// case 13:
|
||||
// controller.select();
|
||||
// e.preventDefault();
|
||||
// break;
|
||||
// case 38:
|
||||
// controller.moveUp();
|
||||
// e.preventDefault();
|
||||
// break;
|
||||
// case 40:
|
||||
// controller.moveDown();
|
||||
// e.preventDefault();
|
||||
// break;
|
||||
// }
|
||||
// }
|
||||
// });
|
||||
// }
|
||||
});
|
||||
|
|
Loading…
Reference in a new issue