Skip to content

Cannot jump to the content of the search by clicking the results #1090

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
MichaelXoXo opened this issue Mar 23, 2020 · 13 comments · Fixed by #1175
Closed

Cannot jump to the content of the search by clicking the results #1090

MichaelXoXo opened this issue Mar 23, 2020 · 13 comments · Fixed by #1175

Comments

@MichaelXoXo
Copy link

MichaelXoXo commented Mar 23, 2020

env:

docsify-cli version:
  4.4.0

problem: I create a page: https://awesome-wiki.github.io/awesome-wiki-bookmarks/#/ ,when I type Linux in the search placeholder, It can show the results of search, I click the reulst, it can't jump to the content!

PS: not every result cannot jump by clicking

@MichaelXoXo MichaelXoXo changed the title Cannot jump to the content of the search by clicking Cannot jump to the content of the search by clicking the results Mar 23, 2020
@anikethsaha
Copy link
Member

its working fine with our docs. Can you create a reproducible sandbox for this.

@MichaelXoXo
Copy link
Author

@anikethsaha
Copy link
Member

anikethsaha commented Mar 23, 2020

I am asking for the sandbox or repo so that I can take a look cause its working fine in our docs site.

Also, you didnt fill the issue template.we have written in clear in the template that we will close the issue if it's not there. That template is important and helps us in investigating the matter quickly.

@mouchar
Copy link

mouchar commented Apr 11, 2020

@anikethsaha, navigating to search results does not work reliably even on your docs site (https://docsify.js.org/).
I tried in Chrome 81 and Firefox 75.0

Simple test scenario:

  • Go to https://docsify.js.org/
  • Click to the search box, fill in some work with a lot of results (I used github)
  • Click on random results and carefully watch what happens.

Many links work as expected, some navigate to the wrong location (correct page, wrong anchor) and some simply do nothing.

I think the issue often occurs when trying to navigate to another anchor on the same page.

@anikethsaha
Copy link
Member

Many links work as expected, some navigate to the wrong location (correct page, wrong anchor) and some simply do nothing.

I think the issue often occurs when trying to navigate to another anchor on the same page.

its working as expected.

  • Click to the search box, fill in some work with a lot of results (I used github)
  • Click on random results and carefully watch what happens.

I typed github and clicked every link visible in it, working as expected. Maybe I am missing something.

@jjallaire
Copy link

I am seeing this same behavior both locally as well as on the docsify-themeable website. Here's what I see:

docsify-search

Note that the URL changes to include id=emoji but the page doesn't navigate to the emjoi section.

@sy-records
Copy link
Member

@jjallaire The next version should be fixed. #1190

@jjallaire
Copy link

Excellent! I was speculating that this might also have something to do w/ async image loading (as I have a number of screenshots on the page): https://gitmemory.com/issue/docsifyjs/docsify/624/489617399

@jjallaire
Copy link

jjallaire commented May 24, 2020

Is there a straightforward way to run the new version on my site prior to its release?

@sy-records
Copy link
Member

Is there a straightforward way to run the new version on my site prior to its release?

You can try to load these two js files.

<script src="//cdn.jsdelivr.net/gh/sy-records/staticfile@master/js/docsify/docsify.min.js"></script>

<script src="//cdn.jsdelivr.net/gh/sy-records/staticfile@master/js/docsify/search.min.js"></script>

@jjallaire
Copy link

That works great, thank you!!!!!

@sy-records sy-records added pinned This is to pinned the PR/Issue in order to keep it open and removed pinned This is to pinned the PR/Issue in order to keep it open labels May 25, 2020
@sy-records sy-records linked a pull request May 25, 2020 that will close this issue
19 tasks
@sy-records
Copy link
Member

fixed via #1175. If there are still questions, you can reopen the issue.

@yash-bst
Copy link

yash-bst commented Jul 3, 2023

This issue is still happening.

  • Searched for "B".
  • Results show "AB" and "BC" which are from the same page but different sections.
  • I select either one of the choices but it doesn't fully jump to those sections.

I also suspect it is related to lazy loading of images since if I repeatedly select "AB" then "BC" then "AB" and so on. After a couple seconds it starts jumping properly.

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.

6 participants