prevent "Enter" on tags filter input to reload the page

git-svn-id: http://piwigo.org/svn/trunk@26646 68402e56-0260-453c-a942-63ccdbb3a9ee
This commit is contained in:
mistic100
2014-01-12 00:31:16 +00:00
parent a3a23a0ee7
commit 95dd3b88ec

View File

@@ -119,7 +119,7 @@ jQuery('.showInfo').tipTip({
{if count($all_tags)}
<div><label><span class="icon-filter" style="visibility:hidden" id="filterIcon"></span>{'Search'|@translate}: <input id="searchInput" type="text" size="12"></label></div>
{footer_script}{literal}
$("#searchInput").on( "keydown", function() {
$("#searchInput").on( "keydown", function(e) {
var $this = $(this),
timer = $this.data("timer");
if (timer)
@@ -145,6 +145,10 @@ $("#searchInput").on( "keydown", function() {
}
}, 300) );
if (e.keyCode == 13) { // Enter
e.preventDefault();
}
});
{/literal}{/footer_script}
{/if}