Skip to content
Snippets Groups Projects
Commit 4c618e22 authored by Robert Goldmann's avatar Robert Goldmann
Browse files

#274 - dont't prevent on enter for search input

parent f2dad4e9
Branches
Tags
No related merge requests found
......@@ -133,7 +133,11 @@ $( document ).ready(function() {
// prevent form submit on enter (otherwise tag functionality will be hard to use)
$(document).on("keypress", 'form', function (e) {
var code = e.keyCode || e.which;
if((code === 13) && e.target.nodeName!=='TEXTAREA') {
if(code === 13) {
if(e.target.nodeName === 'TEXTAREA' || e.target.id === 'search') {
return true;
}
e.preventDefault();
return false;
}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment