Bootstrap Collapsed Menu Links Not Working on Mobile Devices
Looks like this is a known issue with Bootstrap (https://github.com/twitter/bootstrap/issues/4550 and possibly also https://github.com/twitter/bootstrap/issues/7968) which is very disappointing because it's been open for a long time and never fixed, and the primary reason to use Bootsrtap is its promise of responsive design.
The fix proposed at https://github.com/Bitergia/bootstrap/commit/25e8eeb47f01aceed57cb2715036a69395892fa8 seems to work, but it is using the Bootstrap source code, so if you are using the minified version and are not using the source scripts it looks differently.
I fixed it in my case in the minified version by adding the substring "disable-" to the touchstart test, therefore disabling this functionality.
To do that in your minified bootstrap.min.js file, find the substring
"ontouchstart"
and replace it with
"disable-ontouchstart"
Thank you @Shmalzy for trying to help.
I encountered this issue on iPad. I found I was missing the following on the anchor tags:
href="#collapseSection"
Where #collapseSection is the ID of the collapsing panel. Example:
<div class="panel panel-default">
<div class="panel-heading"><a class="accordion-toggle" href="#collapseHelp" data-toggle="collapse" data-target="#collapseHelp" data-parent="#accordion">Printing Problems?</a></div>
<div id="collapseHelp" class="panel-collapse collapse">
<div class="panel-body">Before you contact the helpdesk, have a look at <a href="Help.asp?PrintHelp">our help system</a>.</div>
</div>
</div>
You should not need to alter the minified JavaScript to correct this issue, as it works fine in the Bootstrap examples. It's all a matter of formatting your HTML correctly.