-
Notifications
You must be signed in to change notification settings - Fork 3.4k
Conversation
Thanks for your pull request. It looks like this may be your first contribution to a Google open source project, in which case you'll need to sign a Contributor License Agreement (CLA) at https://cla.developers.google.com/. If you've already signed a CLA, it's possible we don't have your GitHub username or you're using a different email address. Check the information on your CLA or see this help article on setting the email on your git commits. Once you've done that, please reply here to let us know. If you signed the CLA as a corporation, please let us know the company's name. |
I have just signed the CLA |
We found a Contributor License Agreement for you (the sender of this pull request) and all commit authors, but as best as we can tell these commits were authored by someone else. If that's the case, please add them to this pull request and have them confirm that they're okay with these commits being contributed to Google. If we're mistaken and you did author these commits, just reply here to confirm. |
I'm the only commiter of the pull request. The other commiters were result of a merge of existing commits. |
@kennethcachia - let me know what I should do with this PR. Thx. |
if i apply this change to the current master this issue is also fixed : #1545 /**
* MdGesture factory construction function
*/
function MdGesture($$MdGestureHandler, $$rAF, $timeout) {
var userAgent = navigator.userAgent || navigator.vendor || window.opera;
var isIos = userAgent.match(/ipad|iphone|ipod/i);
var isAndroid = userAgent.match(/android/i);
var self = {
handler: addHandler,
register: register,
// TODO only hijack clicks on Android < 4.4
// TODO allow an override for this (through provider?)
isHijackingClicks: (isIos || isAndroid) && !window.jQuery
};
if (self.isHijackingClicks) {
self.handler('click', {
options: {
maxDistance: 6
},
onEnd: function (ev, pointer) {
if (pointer.distance < this.state.options.maxDistance) {
this.dispatchEvent(ev, 'click');
}
}
});
} |
This change also fixes #1792. We can merge it. |
Checks if jquery is defined in the when defining shouldHijackClicks. This avoids the event hijack when jquery is defined and avoids the bind of the click event that was causing the click being triggered twice.