web-infra-dev / rspress

🦀💨 A fast Rspack-based static site generator.
https://rspress.dev
MIT License
1.46k stars 135 forks source link

[Bug]: Enable `enableScrollToTop` and `hideNavbar: 'auto'` at the same time, nav will not be displayed when scrolling to the top #1588

Open chansee97 opened 5 days ago

chansee97 commented 5 days ago

Version

System:
    OS: Windows 11 10.0.22000
    CPU: (12) x64 AMD Ryzen 5 5600X 6-Core Processor
    Memory: 15.31 GB / 31.93 GB
  Browsers:
    Edge: Spartan (44.22000.120.0), Chromium (127.0.2651.74)
    Internet Explorer: 11.0.22000.120

Details

同时开启enableScrollToTop和hideNavbar: 'auto' 滚动置顶时不会自动显示nav,需要再滚动变化一下才会显示

https://github.com/user-attachments/assets/91d5e866-edbb-49f2-bf5b-fed481a2b578

Reproduce link

null

Reproduce Steps

  1. 配置

    themeConfig: {
    hideNavbar: 'auto',
    enableScrollToTop: true,
    },
  2. 使用滚动置顶,nav没有自动显示

Timeless0911 commented 4 days ago

There is currently no linkage between these two configurations which should be a bug 😂.