Permalink
Browse files

Fixes #33656

  • Loading branch information...
1 parent 5f34ee1 commit d9b409bd9e0923cc405a112d68ae2fc5b01e63d9 @astagi astagi committed Jan 30, 2012
Showing with 10 additions and 5 deletions.
  1. +10 −5 assets/www/js/chrome.js
View
@@ -96,11 +96,16 @@ window.chrome = function() {
$("#searchForm").bind('submit', function() {
window.search.performSearch($("#searchParam").val(), false);
return false;
- }).bind('keypress', function() {
- // Needed because .val doesn't seem to update instantly
- setTimeout(function() {
- window.search.performSearch($("#searchParam").val(), true);
- }, 5);
+ }).bind('keypress', function(event) {
+ if(event.keyCode == 13)
+ {
+ $("#searchParam").blur();
+ }else{
+ // Needed because .val doesn't seem to update instantly
+ setTimeout(function() {
+ window.search.performSearch($("#searchParam").val(), true);
+ }, 5);
+ }
});
$("#clearSearch").bind('touchstart', function() {
clearSearch();

0 comments on commit d9b409b

Please sign in to comment.