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

Merge branch...

Merge branch 'hotline#148279_administration_quand_on_appuie_sur_la_touche_entree_dans_le_champ_de_recherche_cela_recharge_la_page' into 'master'

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

See merge request !4428
parents dae3da67 73d527bd
Branches
Tags
1 merge request!4428hotline #148279 disable form submit on ENTER keypress in javascript search
Pipeline #17133 passed with stage
in 42 minutes and 40 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