aboutsummaryrefslogtreecommitdiff
path: root/wqflask
diff options
context:
space:
mode:
Diffstat (limited to 'wqflask')
-rwxr-xr-xwqflask/wqflask/templates/index_page.html9
1 files changed, 6 insertions, 3 deletions
diff --git a/wqflask/wqflask/templates/index_page.html b/wqflask/wqflask/templates/index_page.html
index 6c630344..8b66a5b0 100755
--- a/wqflask/wqflask/templates/index_page.html
+++ b/wqflask/wqflask/templates/index_page.html
@@ -270,10 +270,13 @@
function pressed(e) {
// Has the enter key been pressed?
if ( (window.event ? event.keyCode : e.which) == 13) {
- // If it has been so, manually submit the <form>
- document.forms[1].submit();
+ // If enter key has been pressed and the search fields are non-empty
+ // manually submit the <form>
+ if( event.target.value != "" ) {
+ document.forms[1].submit();
+ }
}
}
</script>
-{% endblock %} \ No newline at end of file
+{% endblock %}