Browse Source

[search] Fixed copy bug on public search page

Enrico Berti 12 years ago
parent
commit
94c4157ba8
1 changed files with 6 additions and 4 deletions
  1. 6 4
      apps/search/src/search/templates/search.mako

+ 6 - 4
apps/search/src/search/templates/search.mako

@@ -298,10 +298,12 @@ ${ commonheader(_('Search'), "search", user, "40px") | n,unicode }
 
     $("#id_query").focus();
 
-    $(document).on("keydown", function () {
-      if (!$("#id_query").is(":focus")) {
-        $("#id_query").focus();
-        $("#id_query").val($("#id_query").val());
+    $(document).on("keydown", function (e) {
+      if (!e.ctrlKey && !e.altKey && !e.metaKey){
+        if (!$("#id_query").is(":focus")) {
+          $("#id_query").focus();
+          $("#id_query").val($("#id_query").val());
+        }
       }
     });