Scala Programming Language
  1. Scala Programming Language
  2. SI-5055

Scaladoc keeps being focused on the search field instead of going down when pressing page down

    Details

      Activity

      Hide
      Hubert Plociniczak added a comment -

      Just go to doc for say List and press page down, you will get what I mean. Very annoying.

      Show
      Hubert Plociniczak added a comment - Just go to doc for say List and press page down, you will get what I mean. Very annoying.
      Hide
      Grzegorz Kossakowski added a comment -

      Same for copy & paste. There's no way to select text in Scaladoc.

      Show
      Grzegorz Kossakowski added a comment - Same for copy & paste. There's no way to select text in Scaladoc.
      Hide
      Rüdiger Keller added a comment -

      Annoying indeed. I didn't try that when I wrote the Javascript. Try replacing lines 37-40 in template.js with the following:

       $(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();
          }
      });
      

      With this the code is far more selective in when to focus the input field. It will only focus it when the user presses Escape, a letter or a digit, but not when CTRL or ALT are also pressed.

      Show
      Rüdiger Keller added a comment - Annoying indeed. I didn't try that when I wrote the Javascript. Try replacing lines 37-40 in template.js with the following: $(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(); } }); With this the code is far more selective in when to focus the input field. It will only focus it when the user presses Escape, a letter or a digit, but not when CTRL or ALT are also pressed.
      Hide
      Commit Message Bot added a comment -

      (heathermiller in r25806) Fixes to javascript in Scaladoc, contributed by Ruediger Keller. Closes SI-5055, no review.

      Show
      Commit Message Bot added a comment - (heathermiller in r25806 ) Fixes to javascript in Scaladoc, contributed by Ruediger Keller. Closes SI-5055 , no review.

        People

        • Assignee:
          Rüdiger Klaehn
          Reporter:
          Hubert Plociniczak
        • Votes:
          0 Vote for this issue
          Watchers:
          7 Start watching this issue

          Dates

          • Created:
            Updated:
            Resolved:

            Development