Join GitHub today
Clicking a currently active navbar tab removes ui-btn-active class and styling #5707
With the upgrade from 1.2.0 to 1.3.0, I've noticed that upon clicking an already active navbar tab, the active styling is removed from the tab and will not return upon further clicks. In 1.2.0, clicking the currently active navbar tab would do nothing to the styling of that tab (the ui-btn-active class would persist).
Test page using jQuery Mobile 1.3 and jQuery 1.9: http://jsbin.com/onibuc/286/edit
I would expect subsequent clicks of the currently active tab to have no visual effect on the page. I've reproduced this behavior on the desktop with Chrome 25, as well as iOS 6 and Android 4.0.
Looking through the code, I believe this issue is related to the fix for issue #1181 which removes the active class from the active nav button when the pagechange event is fired. Clicking an already active page in the navbar seems to fire pagechange, and cause the active tab to lose the active class.
@agcolom Yes - it is fixed when "#" is used as the href of for the current page. I was hoping to not have to do that, since we are using the same code for our navbar on all pages (while only changing which nav option gets the
It can also be seen on the persistant navbar demo page: http://jquerymobile.com/demos/1.3.0/docs/widgets/navbar/footer-persist-a.html