Nav Dropdown Flashes on First Click


Topic: Nav Dropdown Flashes on First Click

sherylg343 asked 4 years ago

Expected behavior Click on dropdown menu link and have menu items/links appear for selection Actual behavior Dropdown Menu flashes and disappears. A second click and any subsequent clicks will cause the menu to stay open for selection. This nav header only appears on home page for large screens. NOTE: followed mdb code. regular links work fine - only dropdown menus don't work as expected. Also, a previous version works fine. Have compared 2 sets of code and found no significant differences. And commented out those differences and still had problem. Switched out version of jquery - no difference. Resources (screenshots, code snippets etc.) https://mdbootstrap.com/snippets/standard/sherylg343/3112724 https://janeric2.herokuapp.com/ - latest version does not work https://janeric.herokuapp.com/ - initial version does work


Marcin Luczak staff answered 4 years ago

Hi,

Your snippet should be using jQuery technology, now it uses MDB Standard and it won't work. I've pasted your dropdowns code and in the snippet it works properly for both of them: https://mdbootstrap.com/snippets/jquery/marcin-luczak/3113085

Have you changed something in the setup of your code between versions?

Keep coding, Marcin


sherylg343 commented 4 years ago

Marcin - Thanks for your comment. I've been using diffchecker to look for differences between the two. Can you explain a bit more about what you mean that my snippet should be using jQuery technology and it's now using MDB Standard? The pro files are loaded in my workspace - should I be linking to different ones? and I did swap out and use a jquery cdn to make sure I had latest version as older ones were known to cause this issue. Thanks for your help and prompt response.
Sheryl


Marcin Luczak staff commented 4 years ago

I was referring to your snippet: https://mdbootstrap.com/snippets/standard/sherylg343/3112724 which code will not work as you are using here the syntax from the MDB4 and the snippet settings shows that technology is set to the MDB5 Standard.

In the sources of your site with flashing dropdowns I saw that you have multiple instances of the popper and your properly working site has only one. Maybe that can be the cause of your flashing dropdowns.


sherylg343 commented 4 years ago

great - thanks for clarifying and for the tip about the popper. I appreciate all of your assistance!


Marcin Luczak staff commented 4 years ago

Your welcome, we are here to help you :)


Please insert min. 20 characters.

FREE CONSULTATION

Hire our experts to build a dedicated project. We'll analyze your business requirements, for free.

Status

Answered

Specification of the issue
  • User: Free
  • Premium support: No
  • Technology: MDB jQuery
  • MDB Version: MDB4 4.19.2
  • Device: MacBook Pro
  • Browser: Chrome
  • OS: OS 10.12.6
  • Provided sample code: No
  • Provided link: Yes