Skip to content

Commit

Permalink
[base] Remove faulty keypress condition in input text component
Browse files Browse the repository at this point in the history
See d4f5520#commitcomment-23920421

(cherry picked from commit d3722b4)
  • Loading branch information
ddeboer committed Aug 28, 2017
1 parent 41e9f0c commit dc1ead1
Showing 1 changed file with 3 additions and 7 deletions.
10 changes: 3 additions & 7 deletions modules/mod_ginger_base/lib/js/search/components/input-text.js
Original file line number Diff line number Diff line change
Expand Up @@ -9,13 +9,9 @@ $.widget("ui.search_cmp_input_text", {
me.type = 'qs';

me.widgetElement.keypress(function(event) {
if (event.keyCode == 13) {
var onSeachPage = ($('.do_search_ui') < 0);

if (onSeachPage) {
event.preventDefault();
$(document).trigger('search:inputChanged');
}
if (event.keyCode === 13) {
event.preventDefault();
$(document).trigger('search:inputChanged');
}
});

Expand Down

0 comments on commit dc1ead1

Please sign in to comment.