I have an ontouchstart
event triggered on my mobile view, its linked to this:
function mobileLinksShow() {
document.querySelector(\'.mobile-head
This is still broken for cases like a touchscreen laptop (where 'click' may be from touch or from a mouse). Its also broken in some mobile cases where click doesn't come from touch (eg. Enter key on an attached or bluetooth keyboard).
The right solution is to correctly mark the touch event as handled with preventDefault, then no click event will be generated. Eg.
function mobileLinksShow(event) {
document.querySelector('.mobile-head-bar-links').classList.toggle('mobile-head-bar-links-transition');
event.preventDefault();
}
See http://www.html5rocks.com/en/mobile/touchandmouse/ for details.