Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Closed
scabug opened this issue Oct 4, 2011 · 5 comments
Labels
Milestone

Comments

@scabug
Copy link

@scabug scabug commented Oct 4, 2011

(No description for SI-5055.)

@scabug

This comment has been minimized.

Copy link
Author

@scabug scabug commented Oct 4, 2011

Imported From: https://issues.scala-lang.org/browse/SI-5055?orig=1
Reporter: @hubertp
Assignee: @rklaehn
Affected Versions: 2.9.2

@scabug

This comment has been minimized.

Copy link
Author

@scabug scabug commented Oct 4, 2011

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

@scabug

This comment has been minimized.

Copy link
Author

@scabug scabug commented Oct 4, 2011

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

@scabug

This comment has been minimized.

Copy link
Author

@scabug scabug commented Oct 4, 2011

Rüdiger Keller (ruedigerk) said:
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.

@scabug

This comment has been minimized.

Copy link
Author

@scabug scabug commented Oct 9, 2011

Commit Message Bot (anonymous) said:
(heathermiller in r25806) Fixes to javascript in Scaladoc, contributed by Ruediger Keller. Closes #5055, no review.

@scabug scabug closed this Oct 9, 2011
@scabug scabug added the scaladoc tool label Apr 7, 2017
@scabug scabug added this to the 2.10.0-M3 milestone Apr 7, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Linked pull requests

Successfully merging a pull request may close this issue.

None yet
1 participant
You can’t perform that action at this time.