facebook / docusaurus

Easy to maintain open source documentation websites.
https://docusaurus.io
MIT License
55.96k stars 8.4k forks source link

Docusarus.io documentation menus don't work on mobile Safari #8714

Closed voidmain closed 1 year ago

voidmain commented 1 year ago

Have you read the Contributing Guidelines on issues?

Prerequisites

Description

The Docusaurus.io documentation menus often don't work in mobile Safari. The hamburger menu often doesn't respond to click events and the table of contents menu doesn't either. Refreshing the page doesn't help.

At some point, after navigating around the docs using standard anchor tags (like the Next links at the bottom), the mobile nav begins to work.

Safari is somewhat notorious for these types of "works sometimes" issues with JavaScript. My guess is that the JavaScript that is handling the menus has a branch that fails in certain situations and that causes it to fail. Eventually the JavaScript is loaded properly and begins working, but that's only after numerous page loads and navigation.

Next time this happens I can try attaching to the desktop debugger and see what's up.

Reproducible demo

No response

Steps to reproduce

  1. Open Safari on iOS
  2. Navigate to the Docusaurus.io website
  3. Open the hamburger (this one always seems to work) and click docs
  4. Click the hamburger menu again and see if it opens

Expected behavior

The menus should always work.

Actual behavior

The menus periodically don't work.

Your environment

Self-service

slorber commented 1 year ago

That would indeed help if you could record a video or screenshot or send us the terminal output.

Keep in mind that if you are under a very slow network, the hamburger menu won't work until the JS has finished loading because it is not (yet) progressively enhanced. Most of the time you probably don't see it, but under bad networks this is likely more common.

slorber commented 1 year ago

Closing until someone show a video of the problem