Skip to content

Click the search results on the left, the right page cannot be located #1098

Closed

Description

@CHU295

Bug Report

Steps to reproduce

show this in stackoverflow
https://stackoverflow.com/questions/60945607/docsify-click-the-search-results-on-the-left-the-right-page-cannot-be-located

What is current behaviour

What is the expected behaviour

Other relevant information

  • Bug does still occur when all/other plugins are disabled?

  • Your OS:

  • Node.js version:

  • npm/yarn version:

  • Browser version:

  • Docsify version:

  • Docsify plugins:

Please create a reproducible sandbox

Edit 307qqv236

Mention the docsify version in which this bug was not present (if any)

Activity

  1. CHU295 commented on Apr 10, 2020

    @CHU295
    ContributorAuthor

    I found the reason. Sometimes the a tag of the search box will not trigger the listening event, which causes the navigation to be false. At this time, the value of source is history, so the location will not be updated
    At this point, a simple solution is to set navigation to true by default

  2. CHU295 commented on Apr 10, 2020

    @CHU295
    ContributorAuthor

    image
    After the query, it is because the search source code has errors. As shown in the figure, in most cases, the element that triggers the click event is not A tag. At this time, stopPropagation event causing the problem mentioned in the previous article. Navigation = false so that source = history so that the page will not be located

    In line 286 of the source code search.js
    image

    My poor English。。。

  3. added a commit that references this issue on Apr 10, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions