summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorHeather Miller <heather.miller@epfl.ch>2011-10-09 15:36:22 +0000
committerHeather Miller <heather.miller@epfl.ch>2011-10-09 15:36:22 +0000
commit4646937ff874c9b21aed22c0d61a23761f4a230b (patch)
treee430700c9b2d0289d318594c89d8860cc33beecf
parent497e6321a0aea209b679c428f1b76219d2920fd3 (diff)
downloadscala-4646937ff874c9b21aed22c0d61a23761f4a230b.tar.gz
scala-4646937ff874c9b21aed22c0d61a23761f4a230b.tar.bz2
scala-4646937ff874c9b21aed22c0d61a23761f4a230b.zip
Fixes to javascript in Scaladoc, contributed by...
Fixes to javascript in Scaladoc, contributed by Ruediger Keller. Closes SI-5055, no review.
-rw-r--r--src/compiler/scala/tools/nsc/doc/html/resource/lib/template.js9
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();