Archived topic
Flyout menu link to external website doesn't close after clicking on menu item
12 replies · Started by Richard on April 9, 2018
I'm still pretty new at setting up a WordPress website and am struggling to get my dropdown menus working smoothly. The problem I'm having occurs in menu items which are custom links to external sites. It does not occur if the menu item is a page on my website. I've seen that the dropdown/flyout menu does close/retract if I have Max Mega Menu activated and click on a custom link menu item, but that plug-in has far more complexity than I want or need to master. Using GeneratePress, is there code that I can include which will enable those dropdown menus to automatically close upon clicking on the menu item rather than staying open on the last flyout until I click elsewhere? Alternatively, would the problem be eliminated if I upgraded to version 2.0.2?
Hi there,
What version are you using currently?
It's always good to update regardless if it solves this problem or not.
Your site is also under maintenance page so I can't actually see the problem.
Any chance you can disable it so I can see?
Hi Leo,
I've temporarily disabled the coming soon page, so you can see the problem. You can see it happening when selecting an item under "Links". The item should open the external site in a new tab. When you go back to my website, you should see the still open flyout menu.
I've also noticed that in the Edge browser, not only does the flyout menu fail to close after clicking on an item; it also blinks on and off until one clicks elsewhere.
I'm using version 1.6.2 of GeneratePress, with the current updates. What would version 2.0.2 offer by way of additional features?
This looks like a bug - I'll take a deeper look and will hopefully include a fix in 2.1 :)
Thanks!
Do you have a time estimate for availability of the potential fix? Since I am still in development, would it be advisable to install the beta of 2.1 when it includes the fix?
I'll try to get it fixed today.
If your site is in development still, there shouldn't be any issues using 2.1 :)
I just released 2.1-rc.1, which fixes this: https://github.com/tomusborne/generatepress/issues/63
Thanks!
Yep, the flyout menus are now working as they should. You guys are amazing!! Must be that Vancouver Island weather. Many thanks for taking care of this so quickly.
No problem :)
After a lapse of time, I now see that the problem I had with the flyout menus not closing when clicking on a custom link (which you remedied), likewise occurs when clicking on a menu item which is a page on my website. This occurs when a browser forces the opening of a new tab when clicking on such a menu item, though it is not a problem when the page is opened in the same tab. Is this something that can be fixed, as you did for the custom link menu items?
This happens when the menu item is active. It's an accessibility feature that allows users to navigate your website using the tab key on their keyboard.
Unfortunately we can't remedy this without removing that accessibility feature.
Typically it's not good practice to open new tabs within your own website.
Understood, Tom. I have my browser set to not open new tabs within the same website, either mine or others, thought there are add-ons for example in Firefox which force new tabs even within the same website. I had accidentally and temporarily made that setting. That's when I noticed the behavior of the menus. As for the way I'm developing my website, I do not require new tabs for pages on the website.
Thanks for your quick response. Otherwise, everything seems to be functioning fine. I'll just leave things as they are.
No problem. I'll keep this in mind moving forward :)