XF 2.0 Mobile navigation breaks after modifying HTML

Ehren

Well-known member
Hello,

I wasn't really sure if this topic is classified as a bug, suggestion or feedback - so apologies if it's in the wrong category.

I'm using xf2 beta 1, but I'm assuming the code is the same in the latest beta. I'm creating a theme and have removed the navigation menu from the .p-nav div, placing it inside the header bar instead. This has caused the mobile navigation menu to break, because the javascript code in structure.min.js which creates the mobile menu references the following (which, after the HTML adjustment, no longer exists)
Code:
(".p-nav .p-navEl")

This restriction greatly limits designers since the navigation menu is forced to stay inside the .p-nav div, which isn't always ideal. Changing the above code to the following will allow designers to place the navigation code wherever they like, without breaking the mobile menu:
Code:
(".p-nav-list .p-navEl")
 
Last edited:
I have actually changed this to use .js-offCanvasNavSource as the target (which has been added to the .p-nav element now).
 
Top Bottom