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

rustdoc: Cannot go back page when enable "I'm feeling lucky" setting #75774

Closed
tesuji opened this issue Aug 21, 2020 · 3 comments · Fixed by #75806
Closed

rustdoc: Cannot go back page when enable "I'm feeling lucky" setting #75774

tesuji opened this issue Aug 21, 2020 · 3 comments · Fixed by #75806
Labels
C-bug Category: This is a bug. T-rustdoc Relevant to the rustdoc team, which will review and decide on the PR/issue.

Comments

@tesuji
Copy link
Contributor

tesuji commented Aug 21, 2020

Enable "Directly go to item in search if there is only one result" option on Settings
image

Search an unique item in search box generated by rustdoc, it will lead you to the doc of that item.
Click the go back button in browser, the page will change to previous search result and go forward
to the doc of the searched item.

How to reproduce the issue:

Meta

rustc --version --verbose: 1.47.0-nightly (e15510c 2020-08-20)

cc @GuillaumeGomez

@tesuji tesuji added the C-bug Category: This is a bug. label Aug 21, 2020
@rustbot rustbot added the T-rustdoc Relevant to the rustdoc team, which will review and decide on the PR/issue. label Aug 21, 2020
@GuillaumeGomez
Copy link
Member

Well, you can but since there is only one result, it puts you back haha. (Ok, we can consider it as bug, but it's a funny one)

@workingjubilee
Copy link
Member

The single search result page can be elided using the History API to disappear it, leaving the back button to take you to before the search. I believe this would be the desired behavior?

@Lonami
Copy link
Contributor

Lonami commented Aug 21, 2020

What about detecting the key release to check if there's a single item and redirect, instead of redirecting after calculating the results?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
C-bug Category: This is a bug. T-rustdoc Relevant to the rustdoc team, which will review and decide on the PR/issue.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

5 participants