docsearch
docsearch copied to clipboard
Results displays an incorrect title in Safari
Description
The displayed title of a Results
section can be different for the same search result in Safari or Chrome/Firefox. We noticed this issue in our iOS docs for the search term output
.
There are situations where the titles are consistent between both browsers but will become inconsistent once you continue to type your search term. I also noticed situations where titles were incorrect until Safari updated the UI and displayed the correct titles afterward.
Chrome:
Safari:
This issue can also be reproduced if you search on other sites like https://docusaurus.io
Chrome:
Safari:
Steps to reproduce
- Go to https://docusaurus.io
- Click on
Search
- Enter
out
in the Input
Expected behavior
The titles should be:
- API
- Markdown Features
- Plugins
- Guides
- Migrating from v1 to v2
Actual behavior
The titles are:
- API
- API
- Plugins
- Blog
- Plugins
Environment
- OS: macOS
- Browser: Safari
- DocSearch version:
"@docsearch/react": "3.1.1"
Thanks for reporting! That's a funny behavior 🤔
I also noticed situations where titles were incorrect until Safari updated the UI and displayed the correct titles afterward.
Indeed, moving them out of the view and coming back (e.g. scrolling) updates it to its correct value
I can indeed reproduce on a bare minimal reproduction:
- https://z9oxj.csb.app
- search for
install