question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

dropdown JS doesn't work on iPad

See original GitHub issue

Code like the following works on desktop browsers, but on the iPad, the dropdown menu isn’t opening:

<ul class="nav pull-right">
    <li class="dropdown">
        <a class="dropdown-toggle" data-toggle="dropdown"> <strong>Drew Dara-Abrams</strong> 
        <b class="caret"></b>
        </a>
        <ul class="dropdown-menu">
            <li>
                <a href="/admin/users/1">Edit Your Profile</a>
            </li>
            <li class="divider"></li>
            <li>
                <a href="/users/sign_out">Sign Out</a>
            </li>
        </ul>
    </li>
</ul>

I’ve tried both the 2.0 release of bootstrap-dropdown.js and the latest from 2.0.3-wip.

Issue Analytics

  • State:closed
  • Created 11 years ago
  • Comments:34 (2 by maintainers)

github_iconTop GitHub Comments

1reaction
thiagolenzcommented, Dec 11, 2012

I have the same problem … This is the html that doesn’t work on ipad. I can’t click on the sub-itens I already hack this html with

<div class="btn-group">
    <button class="btn dropdown-toggle" data-toggle="dropdown">Export <span class="caret">
</span></button>
    <ul class="dropdown-menu">
        <#if  print?exists>
            <li><a href="javascript:print('${print}');">Print in PDF</a></li>
        </#if>
        <#if  printList?exists>
            <li><a href="javascript:print('${printList}');">Print list in PDF</a></li>
        </#if>
        <li><a href="javascript:exportListAt('${targetList}', 2);">Export to Excel</a></li>
        <li><a href="javascript:exportListAt('${targetList}', 1);">Export to CVS</a></li>
        <li><a href="javascript:exportListAt('${targetList}', 3);">Export to XML</a></li>
    </ul>
</div>
jQuery(document).ready( function (){
    jQuery('.dropdown-toggle')
        .on('touchstart.dropdown', '.dropdown-menu', function (e) { e.stopPropagation(); })
        .on('touchstart.dropdown', '.dropdown-submenu', function (e) { e.preventDefault(); })
    })
0reactions
TheRealSandstreamcommented, Nov 15, 2015

Thanks! sön 15 nov. 2015 kl. 15:47 skrev Julian notifications@github.com:

@TheRealSandstream https://github.com/TheRealSandstream Here: https://github.com/ftlabs/fastclick

— Reply to this email directly or view it on GitHub https://github.com/twbs/bootstrap/issues/2975#issuecomment-156815586.

Read more comments on GitHub >

github_iconTop Results From Across the Web

dropdown menu javascript not working on tablet or iphone
My dropdown menu on my nav bar does not show up on iPhone 6 or iPad. However, the drop-down menu shows on my...
Read more >
How can I get my dropdown menus to work on Safari?
... has dropdown menus, but these don't seem to work in Safari on iPad. ... Tap Settings > Safari > Advanced then make...
Read more >
How to Fix WordPress Drop Down Menu not Working on iPad
To fix the problem of the drop down menu not working on iPad, a better design would be to eliminate the main menu...
Read more >
Issue with Dropdown when using iPad
The dropdown doesn't allow selection from the dropdown when using an iPad using Safari, Chrome or Firefox. Recreated using the dropdown demo ...
Read more >
twenty twelve dropdown menus not working on iPad
Dropdown menus on iPad do not remain open after touching main-level nav item. I experienced this same issue on other sites with Genesis...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found