Summary: Fix bug in enter-press handling in IPR search form

- Legacy-Id: 8925
This commit is contained in:
Ole Laursen 2015-01-27 15:15:29 +00:00
parent b675c06b44
commit d3b56c2644

View file

@ -14,8 +14,9 @@ $(document).ready(function() {
// make enter presses submit through the nearby button
$("form.ipr-search input,select").keyup(function (e) {
if (e.which == 13) {
$(this).next('button[type=submit]').click();
var submitButton = $(this).closest(".form-group").find('button[type=submit]');
if (e.which == 13 && submitButton.length > 0) {
submitButton.click();
return false;
} else {
return true;