1bl4z3r / hermit-V2

Continuing Hermit's legacy to be minimal and fast theme
https://1bl4z3r.github.io/hermit-V2/
MIT License
103 stars 45 forks source link

[BUG] - Popup menubar not hidden when resizing browser window #99

Open Xinyu-Li-123 opened 6 days ago

Xinyu-Li-123 commented 6 days ago

Describe the bug I'm unsure if this is a bug or intended behavior. On a post page, resizing the browser to a smaller window reveals a menu button at the bottom right. Clicking it opens a menubar in the same corner. However, resizing back to a larger window hides the menu button but leaves the menubar visible. The only way to close the menubar is to resize back to a small window and click the menu button again.

To Reproduce The official website of hermit-v2 should be enough to reproduce the bug.

  1. Go to any webpage with a header at the bottom. For example, this page from the official website.
  2. Resize your browser window small enough to make the menu button appear in the header
  3. Click the menu button to call out the popup menubar
  4. Resize your browser window big enough to make the menu button disappear.
  5. Spot the error. You should see the popup menubar still there, and you can't close it.

Expected behavior After step 3 above, the menubar should be hidden when the window is resized to be large, and appear when resized to be small.

Screenshots Resized to a small window, the menu button will appear at the bottom left in the header. Screenshot from 2024-11-22 18-37-02

Click the menu button at the bottom right, and a menubar will pop up: Screenshot from 2024-11-22 18-52-35

Resize to a large window, and the menubar is still there: Screenshot from 2024-11-22 18-38-17

Hugo (please complete the following information):

1bl4z3r commented 4 days ago

Hi @Xinyu-Li-123,

Thanks for bringing this to my attention.

This happens because the components which were active in small width screen remains active unless the page is refreshed, upon which it takes on components which are actually used in wide screen. And vice versa.

This is because I haven't touched it from original theme and to be frank I didn't test it out myself and didn't consider a viable case.

Nonetheless, I will look into this.

1bl4z3r commented 10 hours ago

Hi @Xinyu-Li-123,

I have pushed a fix. If you have time, you may test it out and report; It's working from my end, but a second opinion is always good.