Uploaded image for project: '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

      Attachments

        Activity

        Hide
        plocinic 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
        plocinic 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
        grek Grzegorz Kossakowski added a comment -

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

        Show
        grek Grzegorz Kossakowski added a comment - Same for copy & paste. There's no way to select text in Scaladoc.
        Hide
        ruedigerk 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
        ruedigerk 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
        anonymous Commit Message Bot added a comment -

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

        Show
        anonymous 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:
            rklaehn Rüdiger Klaehn
            Reporter:
            plocinic Hubert Plociniczak
          • Votes:
            0 Vote for this issue
            Watchers:
            7 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved: