This repository was archived by the owner on Sep 5, 2024. It is now read-only.
This repository was archived by the owner on Sep 5, 2024. It is now read-only.
shouldHijackClicks does not work (when associated with ionic?) #1528
Closed
Description
the function:
if (shouldHijackClicks) {
document.addEventListener('click', function(ev) {
// Space/enter on a button, and submit events, can send clicks
var isKeyClick = ev.clientX === 0 && ev.clientY === 0;
if (isKeyClick || ev.$material) return;
// Prevent clicks unless they're sent by material
ev.preventDefault();
ev.stopPropagation();
}, true);
}
does not work when using Android or IOS. It easily reproductible using Chrome dev tools. Try Nexus 5 or Iphone 6 and you will see that none of the button, link etc work..
When I comment the above code it works as expected.
Using Angular 1.3.13, Ionic beta14 and Material 8.0.1-rc1
Hope it helps :)