-
Notifications
You must be signed in to change notification settings - Fork 2.4k
Second navbar on a page doesn't get active state for the second time #2425
Comments
Hi all - Is this still an issue with 1.0.1? If so, we need a test page with steps to reproduce. Template here: |
@DreifGenov or @maxpaynestory Can you create a test page using the template above? |
I have created a test page here. http://dl.dropbox.com/u/63530626/jqm_navbar/navbar_test.html |
got the same issue see this http://jsfiddle.net/ca11111/CxFWh/ I'm wondering if I'm doing it the right way with navbar, or is it a bug, (ui-btn-active class is not added to the selected tab when you return to it) happens on any browser, any OS |
The cause of this issue is that the framework removes the ui-btn-active class upon certain page transition and click events. This should only happen after the class is added by the framework self and not when the class is in the markup. Interesting fact is that all examples in this thread use a multi-page template and I don't see this happening in this example that uses single page navigation model http://jquerymobile.com/test/docs/toolbars/footer-persist-a.html @toddparker - I am going to look into this. Can you flag it 1.1.1 ? |
yes the difference between http://jquerymobile.com/test/docs/toolbars/footer-persist-a.html and http://jsfiddle.net/ca11111/CxFWh/2/ thx |
@auburtin I just checked the JS and the reason the problem doesn't occur on that page is because it is a persistent footer. |
data-position="fixed" ? I have put it also in my navbar, the difference is just it's in header not in footer |
@auburtin See here: http://jquerymobile.com/demos/1.0.1/docs/toolbars/footer-persist-a.html Although that example is about a fixed footer, I think it would work for non-fixed and header as well. |
@auburtin - I found the info in the current docs. It has been moved: http://jquerymobile.com/test/docs/toolbars/footer-persist-d.html |
ok tx here is the fix http://jsfiddle.net/ca11111/CxFWh/3/ |
@auburtin Great that it works and thanks for testing! I used your fiddle to test it without data-position="fixed" and that works as well. |
Hi! |
Fixed by commit 7ad1e84 |
If you open this page - http://m.geometry.omskhost.ru/geometrician/#lobachevsky, you can see that I have 2 same navbars on a page.
Now tab #1 is active, and #1 are active on both navbars.
Now click #2 on any navbar, it slides to page #2, and both #2 are active.
Click #3, the same.
Now go back to #2 (click again #1). You see? Only the bottom #2 gets active state, but the top one not. But both have class="ui-btn-active" in the code.
Go back to #1, the same problem - only the bottom one gets active state.
The problem remains on all browsers (mobile & desktop) since alpha to the latest (http://code.jquery.com/mobile/latest/jquery.mobile.min.js, Thu Sep 8 14:06:02 2011 -0700).
UPD: Sometimes both do not get active state.
The text was updated successfully, but these errors were encountered: