HugoBlox / hugo-blox-builder

🚨 GROW YOUR AUDIENCE WITH HUGOBLOX! 🚀 HugoBlox is an easy, fast no-code website builder for researchers, entrepreneurs, data scientists, and developers. Build stunning sites in minutes. 适合研究人员、企业家、数据科学家和开发者的简单快速无代码网站构建器。用拖放功能、可定制模板和内置SEO工具快速创建精美网站!
https://hugoblox.com/templates/
MIT License
8.2k stars 2.9k forks source link

Hovering over dropdown menu refreshes website #1925

Closed pablobernabeu closed 3 years ago

pablobernabeu commented 3 years ago

Hello,

Thank you for the great Academic theme.

I would be very grateful for your help with a bug.

Describe the bug

Hovering over a dropdown menu refreshes the website, that is, it re-runs the current URL.

To Reproduce

An example is available on my website. To witness the bug,

  1. please visit https://pablobernabeu.github.io/#workshops,
  2. scroll up or down, to move away from the /#workshops section,
  3. mouse over the 'Profile' dropdown menu at the top.

Notice that, as soon as you hover on the Profile dropdown, the website is refreshed to the initial URL, /#workshops.

The relevant menu.toml file is available, as are all other files in the same repo.

Expected behavior

Hovering on the dropdown menu should not shift the website to any other section; it should only lead to dropping down the submenu options.

Technical details:

Thank you very much

gcushen commented 3 years ago

Please confirm if the issue exists on the latest version of the Academic template (https://github.com/wowchemy/starter-academic ), and if so, the steps to reproduce the issue on the latest Academic template.

pablobernabeu commented 3 years ago

Thanks--will do.

pablobernabeu commented 3 years ago

Hi @gcushen, I have good news. I've tested the dropdown menu in an Academic template from scratch, while using the latest versions of Academic and Hugo. The bug is gone.

menus.toml

# Navigation Links
#   To link a homepage widget, specify the URL as a hash `#` followed by the filename of the
#     desired widget in your `content/home/` folder.
#   The weight parameter defines the order that the links will appear in.

[[main]]
  name = "Home"
  url = "#about"
  weight = 10

[[main]]
  name = "Posts"
  url = "#posts"
  identifier = 'posts'
  weight = 20

[[main]]
  name = "Projects"
  url = "#projects"
  parent = 'posts'
  weight = 30

[[main]]
  name = "Publications"
  url = "#featured"
  parent = 'posts'
  weight = 40

[[main]]
  name = "Contact"
  url = "#contact"
  weight = 60

# Link to a PDF of your resume/CV from the menu.
# To enable, copy your resume/CV to `static/files/cv.pdf` and uncomment the lines below.
# [[main]]
#    name = "CV"
#    url = "files/cv.pdf"
#    weight = 70

Best regards, Pablo