Skip to content

Commit

Permalink
supress enter keypresses in HTML input search fields
Browse files Browse the repository at this point in the history
see #295
  • Loading branch information
Bernhard B committed Sep 14, 2021
1 parent 3171499 commit 24cc55c
Showing 1 changed file with 9 additions and 1 deletion.
10 changes: 9 additions & 1 deletion html/templates/modules/validate_browse_select_mode.html
Original file line number Diff line number Diff line change
Expand Up @@ -359,6 +359,14 @@
$("#validationQuery").val(randomElem);
});

$("#validationQuery").keyup(function(event) {
if(event.keyCode === 13) { //when enter inside input field is pressed
event.preventDefault();
populateImageGrid();
$("#validationQuery").blur();
}
});


getValidatedStatistics();
});
Expand All @@ -370,7 +378,7 @@
<div class="row" id="validationQuerySearchContainer">
<div class="four wide column"></div>
<div class="eight wide center aligned column">
<form class="ui form segment">
<form class="ui form segment" onsubmit="return false;"> <!-- do not handle enter key presses in HTML form-->
<div class="field">
<p class="default-text">Search for images you are interested in</p>
<div class="ui action input">
Expand Down

0 comments on commit 24cc55c

Please sign in to comment.