[SOLVED] Navbar keeps hiding in popup

Hi there,

I have a popup with the following code:

I open it using a link such as so data-popup=".categories-popup" and then I create the view with the code below :
self.$$(’.categories-popup’).on(‘popup:opened’, function (e, popup) {
self.$app.views.create(popup.$el.find(’.view’), {
stackPages: true,

It opens and runs perfectly well. However, if i close the popup and open it again, the navbar hides for some reason. Any ideas as to why that might be would really help me.

I realised that when I open the popup a second time a navbar-hidden hidden class is being added to the navbar for somereason

It happens because you create View each time popup opened. But you should do it only once, change .on( to .once(

1 Like

Incredible how something so simple resolves the issue. thank you so much!