Skip to content
Snippets Groups Projects
Commit 73d527bd authored by Ghislain Loas's avatar Ghislain Loas
Browse files

hotline #148279 disable form submit on ENTER keypress in javascript search

parent 54704dcb
Branches
Tags
1 merge request!4428hotline #148279 disable form submit on ENTER keypress in javascript search
Pipeline #17130 passed with stage
in 44 minutes and 45 seconds
- correctif #148279 : Administration : La touche entrée ne recharge plus la page dans les champs de recherche des menus de l'administration.
\ No newline at end of file
......@@ -174,6 +174,10 @@
: $(options.input);
search_input
.on('keypress', function(event) {
if (event.which == '13')
event.preventDefault();
})
.on('keyup', function(event){
onSearchInputChange(this.value);
})
......
......@@ -166,3 +166,8 @@ test('search terms "cate" should not hide his childs', function() {
fixture_ul_li.html());
});
test('keypress on search input should be bind', function() {
$events = $._data(fixture_ul_li.find('input')[0], 'events');
equal($events['keypress'] !== undefined , true);
});
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment