diff options
Diffstat (limited to 'app/assets/javascripts/pages/search/show/search.js')
-rw-r--r-- | app/assets/javascripts/pages/search/show/search.js | 13 |
1 files changed, 3 insertions, 10 deletions
diff --git a/app/assets/javascripts/pages/search/show/search.js b/app/assets/javascripts/pages/search/show/search.js index b411b637f36..cbef5ab1bbc 100644 --- a/app/assets/javascripts/pages/search/show/search.js +++ b/app/assets/javascripts/pages/search/show/search.js @@ -16,16 +16,12 @@ export default class Search { } eventListeners() { - $(document) - .off('keyup', this.searchInput) - .on('keyup', this.searchInput, this.searchKeyUp); + $(document).off('keyup', this.searchInput).on('keyup', this.searchInput, this.searchKeyUp); $(document) .off('click', this.searchClear) .on('click', this.searchClear, this.clearSearchField.bind(this)); - $('a.js-search-clear') - .off('click', this.clearSearchFilter) - .on('click', this.clearSearchFilter); + $('a.js-search-clear').off('click', this.clearSearchFilter).on('click', this.clearSearchFilter); } static submitSearch() { @@ -42,10 +38,7 @@ export default class Search { } clearSearchField() { - return $(this.searchInput) - .val('') - .trigger('keyup') - .focus(); + return $(this.searchInput).val('').trigger('keyup').focus(); } // We need to manually follow the link on the anchors |