docsearch icon indicating copy to clipboard operation
docsearch copied to clipboard

Results displays an incorrect title in Safari

Open alanuecker opened this issue 1 year ago • 1 comments

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:

Screenshot 2022-08-02 at 14 29 50

Safari:

Screenshot 2022-08-02 at 14 29 58

This issue can also be reproduced if you search on other sites like https://docusaurus.io

Chrome:

Screenshot 2022-08-02 at 14 13 00

Safari: Screenshot 2022-08-02 at 14 12 23

Steps to reproduce

  1. Go to https://docusaurus.io
  2. Click on Search
  3. 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"

alanuecker avatar Aug 02 '22 12:08 alanuecker

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

shortcuts avatar Aug 02 '22 13:08 shortcuts