-
Notifications
You must be signed in to change notification settings - Fork 12.8k
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
rustdoc: Ctrl-Enter on search result should open link in new tab #84384
Comments
This is not possible because it'd make us lose focus on the search input, preventing anything else to work. A workaround would be to add the focus on the search only if the ctrl key is pressed, but then what happens if you want to switch result tab instead? I don't think focus will work nicely here... |
As for opening in new tab with ctrl+tab, it'd require a big rework of how we handle the events on the search because when we do it only from JS, on FF it asks confirmation to go to the new tab as "big security concern". If we want to focus on the elements with they keyboard arrows, we won't be able to bind the event for them because people want to scroll using them. |
What I'm proposing is:
That way up/down would continue to work correctly when scrolling docs (I agree it would be very bad to break that behavior). |
But then we couldn't switch between tabs anymore unless handling it from two places. Well, considering all the great work you did until now, I'm pretty sure you have already a plan in mind so I'll just wait for you to amaze me as usual. :p |
…=jsha Prevent control, shift and alt keys to make search input lose focus Part of rust-lang#84384. r? `@jsha`
…=jsha Prevent control, shift and alt keys to make search input lose focus Part of rust-lang#84384. r? ``@jsha``
…=jsha Prevent control, shift and alt keys to make search input lose focus Part of rust-lang#84384. r? ```@jsha```
…=jsha Prevent control, shift and alt keys to make search input lose focus Part of rust-lang#84384. r? ````@jsha````
Steps to reproduce:
Expected result:
First search result is opened in a new tab.
Actual result:
Nothing happens.
In general, Ctrl-Enter works when an
<a>
is focused. The search results are<a>
s. I think mainly we need two things:Reproduces in latest Chrome and Firefox on Linux.
The text was updated successfully, but these errors were encountered: