From 4646937ff874c9b21aed22c0d61a23761f4a230b Mon Sep 17 00:00:00 2001 From: Heather Miller Date: Sun, 9 Oct 2011 15:36:22 +0000 Subject: Fixes to javascript in Scaladoc, contributed by... Fixes to javascript in Scaladoc, contributed by Ruediger Keller. Closes SI-5055, no review. --- src/compiler/scala/tools/nsc/doc/html/resource/lib/template.js | 9 ++++++--- 1 file 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(); -- cgit v1.2.3