Note that there are some explanatory texts on larger screens.

plurals
  1. POjQuery Mobile Panel does not close on click
    primarykey
    data
    text
    <p>I have a PhoneGap application wich uses a jQuery Mobile multipage layout. On every page (page A and page B) I have a navbar for switching between pages. No custom code involved. I also have a panel on every page which opens by clicking the 'new' button in the header.</p> <p>Sometimes it happens that I hit the button (maybe to soft? or to fast?) to open to panel but the buttons just changes it state to "active" and the panel does not open. I cannot click the button anymore. When I change the page and go back (all by using the navbar) page A appears again and now the panel is opened. This is a strange behaviour but could be plausible. But trying to close it now is just impossible. Clicking one of the buttons in the panel is as inactive as clicking on the page itself. The whole thing seems to be froozen.</p> <pre><code> &lt;div data-role="page" id="one"&gt; &lt;div data-role="header" data-transition="fixed"&gt; &lt;a href="#panel_one" data-role="button" data-icon="grid"&gt;New&lt;/a&gt; &lt;h1 class="header"&gt;myApp&lt;/h1&gt; &lt;a href="#popup_one" data-role="button" data-rel="popup" data-icon="gear" data-iconpos="notext" data-corners="false" class="ui-btn-right" data-transition="slidedown" onclick="menu();"&gt;Options&lt;/a&gt; &lt;/div&gt; &lt;!-- Header --&gt; &lt;div data-role="panel" id="panel_one"&gt; &lt;div data-role="collapsible-set" class="menu"&gt;&lt;/div&gt; &lt;/div&gt; &lt;!-- Panel --&gt; &lt;div data-role="content"&gt; &lt;div data-role="navbar"&gt; &lt;ul&gt; &lt;li&gt;&lt;a href="#one" data-transition="none" class="ui-btn-active" &gt;A&lt;/a&gt;&lt;/li&gt; &lt;li&gt;&lt;a href="#two" data-transition="none" &gt;B&lt;/a&gt;&lt;/li&gt; &lt;/ul&gt; &lt;/div&gt; &lt;/div&gt; &lt;!-- Content --&gt; &lt;/div&gt; &lt;!-- Page One--&gt; &lt;div data-role="page" id="two"&gt; &lt;div data-role="header" data-transition="fixed"&gt; &lt;a href="#panel_two" data-role="button" data-icon="grid"&gt;New&lt;/a&gt; &lt;h1 class="header"&gt;myApp&lt;/h1&gt; &lt;a href="#popup_two" data-role="button" data-rel="popup" data-icon="gear" data-iconpos="notext" data-corners="false" data-transition="slidedown" class="ui-btn-right" onclick="menu();"&gt;Options&lt;/a&gt; &lt;/div&gt; &lt;!-- Header --&gt; &lt;div data-role="panel" id="panel_two"&gt; &lt;div data-role="collapsible-set" class="menu"&gt;&lt;/div&gt; &lt;/div&gt; &lt;!-- Panel --&gt; &lt;div data-role="content"&gt; &lt;div data-role="navbar"&gt; &lt;ul&gt; &lt;li&gt;&lt;a href="#one" data-transition="none"&gt;A&lt;/a&gt;&lt;/li&gt; &lt;li&gt;&lt;a href="#two" data-transition="none" class="ui-btn-active" &gt;B&lt;/a&gt;&lt;/li&gt; &lt;/ul&gt; &lt;/div&gt; &lt;/div&gt; &lt;!-- Content --&gt; &lt;/div&gt; &lt;!-- Page Two--&gt; </code></pre> <p><code>menu()</code> creates the content of the Menu which is not shown in the example. Another method (<code>loadPanel()</code>) is boud to the pageshow-event and will populate the sidebar with the buttons. every button will execute</p> <pre><code>var pageId = $.mobile.activePage.attr("id"); $("#panel_" + pageId).panel('close'); </code></pre> <p>before anything else is executed. However, all of this works most of the time and I would just like to know if some observed a similar behaviour.</p>
    singulars
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload