Skip to content

focus wrong for unchanged search after mousing over search results #79962

Closed
@ijackson

Description

@ijackson

This one is a relatively minor bug, since it only happens if you try to search for the same thing you are looking at, which is not a very natural thing to do. But I thought I would report it anyway.

Steps to reproduce

  1. Go to the front page of the std results from rustdoc
  2. Click in the search box at the top of the page
  3. Type in assert (as an example search term) and hit Return
  4. If your rustdoc version has the bug rustdoc help popup appears in every new tab when no web local storage #79960, and you have cookies disabled or are viewing the docs via a file:// url, click anywhere outside the help popup to dismiss it
  5. See that some search results are displayed.
  6. Move the mouse pointer over the search results. A moving highlight is displayed.
  7. Move the mouse pointer over the search box, and left click, to focus the search box
  8. Hit return to search for the same thing again

Expected results

The same search is performed again, so the page reloads with little change.

Actual results

Whatever search result you last moused over, which has the highlight shown, is visited.

@rustdoc modify labels +T-rustdoc -A-rustdoc-ui

Metadata

Metadata

Assignees

No one assigned

    Labels

    A-rustdoc-uiArea: Rustdoc UI (generated HTML)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