Menu Item - Open Link in new window - [bug] opens in both tabs

Hi there,
according to


i have a link in my footer menu, which i wan’t to open in a blank tab. I checked the box “Open up in new Tab” in Menu-Settings.

But after clicking on “ChurchTools” in Footer, it opens up the link as well in the new-tab and also in the main-tab.

Tested on desktop and mobile (android) google chrome & firefox.
Whats wrong?

http://stage.fcg-bielefeld.de/

Hey @kevin_hermann,

I see the issue in your site. But, this does not happen on my even I copied your link to my test site. There’s something in your site causing this. Would you mind testing for a plugin and scripts conflict? You can do this by deactivating all third party plugins, and seeing if the problem remains. If it’s fixed, you’ll know a plugin caused the problem, and you can narrow down which one by reactivating them one at a time.

If that does not help, please give us access to your WordPress admin and FTP in a Secure Note.

Please note though that we might deactivate plugins and scripts so if that is not possible to do in your live site, please copy your site over to a staging server so we could freely troubleshoot.

Thanks.

Hi there, thanks for quick answer,
unfortunately the problem hasn’t been solved,
but i will test it soon on a clean installation.
I tried to deactivate my child-theme and a few plugins with no result.

Thanks

Let us know how it goes with the fresh install.

Hi there @christian_y & @Bappi

i checked it up, i created a new homepage with PRO and Headerbuilder.
Every Plugin is deactivated. It is a clean installation with a little bit of css customation and a few pages.

But now I see where the problem is:

I have had a custom JS Code, that was because of an old bug, where submenu links on mobileview didn’t open correctly.
Is there another solution for this?
Because when i disable this js code below, primarylinks are not clickable on mobilemenu.
As you can see on http://stage.fcg-bielefeld.de

jQuery( function($) {


$(document).on('click', '.x-menu a.x-anchor-menu-item ', function(event){
        if(jQuery(event.target).hasClass('x-anchor-sub-indicator')) {
        	event.preventDefault();
        } else {
        	var url = $(this).attr('href');
        	window.location = url;
        }
});
  
  } );

Hi,

Please change your js code to this.



jQuery( function($) {


$(document).on('click', '.x-off-canvas .x-menu a.x-anchor-menu-item ', function(event){
        if(jQuery(event.target).hasClass('x-anchor-sub-indicator')) {
        	event.preventDefault();
        } else {
        	var url = $(this).attr('href');
        	window.location = url;
        }
});
  
  } );

Hope that helps.

1 Like

Working, thank you!!

You’re welcome!
We’re glad we were able to help you out.

This topic was automatically closed 10 days after the last reply. New replies are no longer allowed.