Disable enterkey press & change icon

This commit is contained in:
AhyoungRyu 2016-08-03 16:12:51 +09:00
parent bd4956a17b
commit 9f1ba42fc2
2 changed files with 9 additions and 2 deletions

View file

@ -41,6 +41,13 @@ jQuery(function() {
display_search_results(results);
});
$('html').bind('keypress', function(event){
// Since keyup() is operated at the above, disable 'Enter Key' press.
if(event.keyCode == 13) {
return false;
}
});
function display_search_results(results) {
var $search_results = $("#search_results");
var zeppelin_version = {{site.ZEPPELIN_VERSION | jsonify}};

View file

@ -28,8 +28,8 @@ limitations under the License.
<div class="input-group" id="search-container">
<input type="text" class="form-control" size="16px" name="q" placeholder="Search all pages" id="search_box">
<span class="input-group-btn">
<button type="submit" class="btn btn-default">
<i class="glyphicon glyphicon-search"></i>
<button type="reset" class="btn btn-default">
<i class="glyphicon glyphicon-remove"></i>
</button>
</span>
</div>