Skip to content

Search modal should close when result selected. #1527

@waylan

Description

@waylan

When using the search modal (popup) to display search results (as we do in the MkDocs theme), the modal does not close when a result is selected. This is fine when the result is on a different page as the browser requests the new page, which is displayed without the modal visible. However, if the result is on the same page, the modal remains open and hides the page. For example, view the homepage of MkDocs' documentation (use the dev serve on the master branch to get the newly refactored search), open the search modal. and search for installation. Select one of the results on the home page (for example "Installation" with the link being #installation). If you look closely you can see the page scroll behind the modal, but the modal does not close. If you close the modal manually, then you can see that the page did properly scroll to the Installation heading. However, the modal should have closed without the extra step.

Metadata

Metadata

Assignees

No one assigned

    Labels

    BugPluginsTheme-generalIssues involving the theme related code within MkDocs

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions