Skip to content
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

When clicking on the favorite and delete buttons in the docSearch box, the link will jump #1139

Closed
3 tasks done
zonemeen opened this issue Aug 8, 2022 · 3 comments · Fixed by #1140
Closed
3 tasks done
Labels
bug Something isn't working

Comments

@zonemeen
Copy link
Collaborator

zonemeen commented Aug 8, 2022

Describe the bug

When clicking on the favorite and delete buttons in the docSearch box, the link will jump.

docSearch-button-bug

Reproduction

https://vitepress.vuejs.org/

Expected behavior

When clicking on the favorite and delete buttons in the docSearch box, the link do not jump.

docSearch-button-normal

docSearch-button

System Info

System:
  OS: Windows 10 10.0.19044
  CPU: (8) x64 Intel(R) Core(TM) i5-9400 CPU @ 2.90GHz
  Memory: 2.59 GB / 15.9 GB
Binaries:
  Node: 16.10.0 - C:\Program Files\nodejs\node
  Yarn: 1.22.17 - C:\Program Files\nodejs\yarn
  npm: 7.24.0 - C:\Program Files\nodejs\npm
  pnpm: 7.2.1 - C:\Program Files\nodejs\pnpm
Browsers:
  Chromium (104.0.5112.79)

Additional context

No response

Validations

  • Follow our Code of Conduct
  • Read the docs.
  • Check that there isn't already an issue that reports the same bug to avoid creating a duplicate.
@zonemeen
Copy link
Collaborator Author

zonemeen commented Aug 8, 2022

@brc-dd Hi, I submitted a PR that included a solution.

@zonemeen zonemeen changed the title Don't jump links when click on the docSearch hit action button Don't jump links when click on the favorite and delete buttons in docSearch box Aug 8, 2022
@zonemeen zonemeen changed the title Don't jump links when click on the favorite and delete buttons in docSearch box When clicking on the favorite and delete buttons in the docSearch box, the link will jump Aug 8, 2022
@brc-dd
Copy link
Member

brc-dd commented Aug 8, 2022

Sorry, but this fix should not be required at our end. According to HTML5 spec, a button cannot be nested inside an anchor tag. DocSearch is creating invalid HTML. I'll create an issue there.

@zonemeen
Copy link
Collaborator Author

zonemeen commented Aug 8, 2022

Ok, I will close this pr, thanks for your work. 😀

@brc-dd brc-dd added bug Something isn't working dependencies and removed bug: pending triage Maybe a bug, waiting for confirmation labels Aug 8, 2022
@github-actions github-actions bot locked as resolved and limited conversation to collaborators Jan 21, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants