Ran into an issue today during development where I was updating my company’s code source from Twitter Bootstrap 2.03 to 2.2.1.
All was fine and dandy until I was doing some cross-device testing, specifically on the iPad and the iPhone.
The touch events stopped working on the Twitter Bootstrap dropdown hover menus. When you try to click on the menu item and attempt to swipe down or anywhere, the menu would disappear.
This is also happening on the official examples and Twitter Bootstrap dropdown hover documentation:
A workaround to this that I have implemented in JS, without having to touch the original code base, is to disable the .on() event handler on the touchstart.dropdown.data-api element.
Therefore add the following line to your code source:
Until Twitter Bootstrap releases a fix for this, the code will remain in my code base for now…
For more information, see https://github.com/twitter/bootstrap/issues/5678