[Nitro Theme] - bug with adding and external link as menu element

When you add external "a href" element to the menu class="nav-link" they work fine on the desktop view but are not working on the mobile menu class="site-mobile-menu not only blocking the external link ( I mean here a link to a different website with a different URL) from opening but also by triggering the following errors in the google inspection tools:

main.js:276 Uncaught TypeError: Cannot read property ‘top’ of undefined
at HTMLAnchorElement.<anonymous> (main.js:276)
at HTMLBodyElement.dispatch (jquery-3.3.1.min.js:2)
at HTMLBodyElement.y.handle (jquery-3.3.1.min.js:2)
(anonymous) @ main.js:276
dispatch @ jquery-3.3.1.min.js:2
y.handle @ jquery-3.3.1.min.js:2

I was able to troubleshoot the external link opening issue by commenting out e.preventDefault() in line #271 of the Main.js file but the quoted inspection tool error still persist.

Is there more seamless way to fix it to remove the error completely from the inspection tools?

Hey there

Most probably template is designed to use scroll feature on the same page and you want it to open the link on another page, it can be customized but such customization is up to you, these are basic HTML templates and they are provided as-is, only with a basic understanding of HTML you will be able to resolve all problems

Thanks for reply @Noda

I thought so about this scrolling feature only BUT it works perfectly fine on desktop. Unfortunately, you can’t solve this particular problem with bare HTML only since the scroll feature includes also the jquery and CSS rules. If the support doesn’t include resolving this type of issues, it would be great to have it included in the documentation, so we know it’s not a bug but default behaviour

Hello

This is a good idea but unfortunately, we don’t have documentation for them, again the reason is that they are very basic HTML template and working with HTML also include a basic understanding of Jquery and CSS. Documentation for these templates would like documentation for HTML :slight_smile:

Best regards