Skip to content

rustdoc: Ctrl-Enter on search result should open link in new tab #84384

Closed
@jsha

Description

@jsha

Steps to reproduce:

  1. Visit a rustdoc page, e.g. https://doc.rust-lang.org/nightly/std/
  2. Hit 'S' to focus search.
  3. Type a search, e.g. "String"
  4. Press the down arrow once to highlight a search result.
  5. Hold down Ctrl (incidentally, notice that the highlighting goes away).
  6. Hit enter.

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:

  1. Make modifier keys (shift, ctrl, etc) not remove the highlighting of search results.
  2. Make sure highlighting search results with the arrow keys also focuses them.

Reproduces in latest Chrome and Firefox on Linux.

Metadata

Metadata

Labels

A-rustdoc-jsArea: Rustdoc's JS front-endC-bugCategory: This is a bug.T-rustdocRelevant to the rustdoc team, which will review and decide on the PR/issue.

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions