Reputation: 4259
The dropdown opens and closes fine but the click event / or touch event isn't being fired. I put together a tiny test case demo but its just as easy to run the twitter bootsrap docs. I have tried this on Android and iOS devices.
I was hoping to rectify by including an Events library like, jQueryMobile or Hammer.js but I'm not sure if this will help as Twitter Bootstap (I think) includes its own touch handlers.
Anyone else come across the problem?
Upvotes: 4
Views: 2607
Reputation: 26
Seems to be a known issue that's resolved in bootstrap 2.1.2 - https://github.com/twitter/bootstrap/pull/5054.
Edit: tried to apply the changes in the ticket about, but couldn't get it to work either.
@CrimsonChin - can you pls elaborate on your implementation. I tried your code, but using JQM with bootstrap I get all kinds of weird behaviors.
Upvotes: 0
Reputation: 4259
As a work around to this problem I used the Jquery Mobile touch events and listened for tapevents on the dropdown. Here is a simple implementation:
$(".dropdown-menu").on("tap", "li a", function(e, ui){
e.preventDefault();
if ($(this).attr("data-toggle") === "modal")
{
$($(this).attr('href')).modal("show");
}
return false;
})
Upvotes: 1