question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Navbar disappears on Safari when scrolled down and then up to the top

See original GitHub issue

🐛 Bug Report

Prerequisites

  • I’m using the latest version of Docusaurus.
  • I have tried the npm run clear or yarn clear command.
  • I have tried rm -rf node_modules yarn.lock package-lock.json and re-installing packages.
  • I have tried creating a repro with https://new.docusaurus.io
  • I have read the console error message carefully (if applicable)

Description

Hello, I think this bug is introduced somewhere between canary v0.0.0-4075 and beta v2.0.0-beta.7. On Safari (v15.0 on Big Sur, and also on iOS), when I scroll down, and then scroll back to the top and pull (rubber band animation), the top nabbar no longer visible. Sorry for typing little, hope you can see the embedded screen capture below to infer.

https://user-images.githubusercontent.com/31024886/137530782-3ef241f3-9d28-4eee-aebc-ae51f981d5ea.mp4

Have you read the Contributing Guidelines on issues?

Yes

Steps to reproduce

Currently, visit https://docusaurus.io/docs using Safari.

Expected behavior

Navbar should stay when scrolled back to the top of the page.

Actual behavior

Navbar not visible.

Your environment

macOS 11.6, Safari 15.0 iOS 14.8

Issue Analytics

  • State:closed
  • Created 2 years ago
  • Comments:5

github_iconTop GitHub Comments

1reaction
Josh-Cenacommented, Oct 16, 2021

The only step necessary to trigger this behavior is to do a rubber band scrolling.

Test

Seems Safari would treat the “scroll past top” as a negative scroll position while Chrome doesn’t. I tested myself using this:

<script>
window.onscroll = (e) => {
  console.log(window.pageYOffset);
}
</script>

When opening this HTML file (which is a blank screen) in Chrome, nothing is logged because any scrolling past the page edge will be ignored; on Safari, negative values are logged when scrolling past top, and positive ones when scrolling past bottom.

0reactions
lex111commented, Oct 16, 2021

Thanks, I see now, PR #5721 should fix it.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Why does my toolbar disappear when I scroll up in safari
When in safari and I scroll toward the bottom of the web page, my toolbar and favorites bars disappear until I scroll upwards....
Read more >
iPad Safari scrolling causes HTML elements to disappear and ...
BTW I just discovered that on an iPad Air 2, when a specific on-screen element (a navbar, in this case) goes off screen,...
Read more >
iOS 10 Safari navbar disappears after opening a <select> menu
go to: https://bootswatch.com/cerulean/ scroll to form and select the select element. The navbar will disappear as long as the iOS Safari ...
Read more >
Build a Fixed Top Navigation that Disappears as Users Scroll
Fixed top navigation helps users navigate your site as they go through its content, but the nav takes up precious real estate as...
Read more >
Is there a way to keep the bottom back forward bar on Safari ...
Tap the bottom of the browser and it returns...otherwise swipe from off screen to go back. The only thing that annoys me about...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found