Active item in navbar loses highlight

Active item in navbar loses highlight

Hello

Im using the lastest jQuery Mobile alpha 3 and is having trouble with the navbar and a multipage template. After navigating 2-3 times using the navbar the currently active menu item is no longer "active" and highlighted.

Below I have pasted my very simple sample which is mostly based on the multipage template on http://jquerymobile.com/demos/1.0a3/#docs/pages/docs-pages.html

I have the described problem in both Firefox 3.5 and Chrome 10, both desktop versions, and a Android 2.2 browser on a HTC Desire.

Am I doing something wrong or is it a bug in jQuery Mobile?





  1. <!DOCTYPE html>
    <html>
    <head>
        <title></title>
        <link rel="stylesheet" href="http://code.jquery.com/mobile/1.0a3/jquery.mobile-1.0a3.min.css" />
        <script src="http://ajax.googleapis.com/ajax/libs/jquery/1.5.1/jquery.min.js" type="text/javascript"></script>
        <script src="http://code.jquery.com/mobile/1.0a3/jquery.mobile-1.0a3.min.js"></script>
    </head>
    <body>
        <!-- Start of first page -->
        <div data-role="page" id="foo">
            <div data-role="header">
                <h1>
                    Foo</h1>
                <div data-role="navbar">
                    <ul>
                        <li><a href="#foo" class="ui-btn-active">Foo</a></li>
                        <li><a href="#bar">Bar</a></li>
                    </ul>
                </div>
                <!-- /navbar -->
            </div>
            <!-- /header -->
            <div data-role="content">
                <p>
                    I'm first in the source order so I'm shown as the page.</p>
                <p>
                    View internal page called <a href="#bar">bar</a></p>
            </div>
            <!-- /content -->
            <div data-role="footer">
                <h4>
                    Page Footer</h4>
            </div>
            <!-- /header -->
        </div>
        <!-- /page -->
        <!-- Start of second page -->
        <div data-role="page" id="bar">
            <div data-role="header">
                <h1>
                    Bar</h1>
                <div data-role="navbar">
                    <ul>
                        <li><a href="#foo">Foo</a></li>
                        <li><a href="#bar" class="ui-btn-active">Bar</a></li>
                    </ul>
                </div>
                <!-- /navbar -->
            </div>
            <!-- /header -->
            <div data-role="content">
                <p>
                    I'm first in the source order so I'm shown as the page.</p>
                <p>
                    <a href="#foo">Back to foo</a></p>
            </div>
            <!-- /content -->
            <div data-role="footer">
                <h4>
                    Page Footer</h4>
            </div>
            <!-- /header -->
        </div>
        <!-- /page -->
    </body>
    </html>