diff options
-rw-r--r-- | src/compiler/scala/tools/nsc/doc/html/resource/lib/template.js | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/src/compiler/scala/tools/nsc/doc/html/resource/lib/template.js b/src/compiler/scala/tools/nsc/doc/html/resource/lib/template.js index 09437063c2..3cdd9a7f27 100644 --- a/src/compiler/scala/tools/nsc/doc/html/resource/lib/template.js +++ b/src/compiler/scala/tools/nsc/doc/html/resource/lib/template.js @@ -34,9 +34,12 @@ $(document).ready(function(){ $("#textfilter input").attr("value", ""); filter(); }); - $(document).keydown(function() { - if (document.activeElement != $("#textfilter input")[0]) - $("#textfilter input").focus(); + $(document).keydown(function(event) { + if(!event.altKey && !event.ctrlKey && + (event.keyCode == 27 || (event.keyCode >= 48 && event.keyCode <= 90)) && + document.activeElement != $("#textfilter input")[0]) { + $("#textfilter input").focus(); + } }); $("#textfilter input").focus(); |