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

Commit

Permalink
fix(gesture): fix conflicts with Ionic Closes #1528
Browse files Browse the repository at this point in the history
Closes #1528. Closes #2761.
  • Loading branch information
kennethcachia authored and ThomasBurleson committed May 7, 2015
1 parent 5c37dc8 commit 05788d2
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions src/core/services/gesture/gesture.js
Original file line number Diff line number Diff line change
Expand Up @@ -439,12 +439,13 @@
* The only way to know if this click is real is to prevent any normal
* click events, and add a flag to events sent by material so we know not to prevent those.
*
* One exception to click events that should be prevented is click events sent by the
* keyboard (eg form submit).
* Two exceptions to click events that should be prevented are:
* - click events sent by the keyboard (eg form submit)
* - events that originate from an Ionic app
*/
document.addEventListener('click', function clickHijacker(ev) {
var isKeyClick = ev.clientX === 0 && ev.clientY === 0;
if (!isKeyClick && !ev.$material) {
if (!isKeyClick && !ev.$material && !ev.isIonicTap) {
ev.preventDefault();
ev.stopPropagation();
}
Expand Down

0 comments on commit 05788d2

Please sign in to comment.