Skip to content

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

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

Closed
1 task
CHU295 opened this issue Mar 31, 2020 · 2 comments · Fixed by #1175
Closed
1 task

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

CHU295 opened this issue Mar 31, 2020 · 2 comments · Fixed by #1175

Comments

@CHU295
Copy link
Contributor

CHU295 commented Mar 31, 2020

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)

@CHU295
Copy link
Contributor Author

CHU295 commented Apr 10, 2020

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

@CHU295
Copy link
Contributor Author

CHU295 commented Apr 10, 2020

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。。。

CHU295 added a commit to CHU295/docsify that referenced this issue Apr 10, 2020
@CHU295 CHU295 mentioned this issue Apr 10, 2020
19 tasks
@sy-records sy-records mentioned this issue May 13, 2020
19 tasks
lucascampos777 added a commit to lucascampos777/Digital-marketing-agency that referenced this issue Apr 1, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant