Note that there are some explanatory texts on larger screens.

plurals
  1. POToggling Class to show/hide navigation not working in Chrome for Android 4.2 (v31)
    primarykey
    data
    text
    <p>I have following markup for my nav-menu and menu icon to toggle it.</p> <pre><code>&lt;a href="#navigation" class="toggle-menu"&gt;&amp;#9776;&lt;/a&gt; &lt;nav id="navigation"&gt; &lt;a href="#" class="nav-item nav-blog active"&gt;Blog&lt;/a&gt; &lt;a href="#" class="nav-item nav-projects"&gt;Projects&lt;/a&gt; &lt;a href="#" class="nav-item nav-showcase"&gt;Showcase&lt;/a&gt; &lt;a href="#" class="nav-item nav-social"&gt;Social&lt;/a&gt; &lt;a href="#" class="nav-item nav-about"&gt;About&lt;/a&gt; &lt;a href="#" class="nav-item nav-close"&gt;&amp;times;&lt;/a&gt; &lt;/nav&gt; </code></pre> <p>In which all menu items stack up vertically when viewing in Smartphone in portrait mode (I use CSS media queries).</p> <p>Following is the initial style of menu items.</p> <pre><code>nav { position: fixed; top: 0; padding-top: 60px; } nav .nav-item { display: table; margin-top: 10px; padding: 2px 10px 2px 10px; width: auto; font-size: 2.5em; text-align: left; margin-left: -230px; /* Keep menu items off-screen by default. */ z-index: 1000; -webkit-transition: margin-left 0.2s ease; -moz-transition: margin-left 0.2s ease; -o-transition: margin-left 0.2s ease; transition: margin-left 0.2s ease; } /* Show Menu on :target or via JS */ nav:target .nav-item, nav.open .nav-item { margin-left: 0; transition: margin-left 0.2s ease; } </code></pre> <p>And now I toggle <code>open</code> class on nav-menu upon click of <code>a.toggle-menu</code>, this works fine and as expected in Chrome Canary 34 (DevTools device emulator) on Desktop, Firefox 26 running on Android 4.2, but it is giving unexpected behaviours in Chrome 31 on Android, as well as any other browser on Android (that uses WebView).</p> <p>What's happening is when page is loaded for first time, and I tap on Menu icon, it shows Nav-menu with transition, and tapping again on Close hides it, but when I tap again the same menu icon, it doesn't show up, but if I double-tap on page (which usually zooms-in the page 1 level), nav-menu appears (without any transition, like it was already present there), and then tapping on close hides it, and this behaviour continues until I reload the page again.</p> <p>Note that I'm currently using jQuery 2.0.3 for event handlers, and this problem persists with both ways of showing/hiding of menu, with JS, without JS.</p> <p>Any help will be appreciated.</p>
    singulars
    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.
 

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