Skip to content
This repository has been archived by the owner on Aug 29, 2023. It is now read-only.

Commit

Permalink
fix(gesture): don't stop hijacking clicks on ios & android when jquer…
Browse files Browse the repository at this point in the history
…y is loaded

Remove window.jQuery from check for hijacking clicks on mobile devices.
Touch clicks were emitted twice when jQuery was loaded which made checkboxes and buttons unusable on mobile devices.

Addressing Issue #1842 Utilizing proposed fix

Closes #1869, #1842.
  • Loading branch information
FrankMeyer authored and ThomasBurleson committed Mar 11, 2015
1 parent a65934e commit 81bcf7f
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/core/services/gesture/gesture.js
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ 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 (window.jQuery || isKeyClick || ev.$material) return;
if (isKeyClick || ev.$material) return;

// Prevent clicks unless they're sent by material
ev.preventDefault();
Expand Down

0 comments on commit 81bcf7f

Please sign in to comment.