Skip to content
This repository has been archived by the owner on Sep 5, 2024. It is now read-only.

fix(gesture): fix conflicts with Ionic #2761

Closed
wants to merge 2 commits into from

Conversation

kennethcachia
Copy link
Contributor

Closes #1528

This is an auto-fix for Ionic conflicts. Alternatively, you can currently fix Ionic conflicts via:
$mdGestureProvider.skipClickHijack();

@ajoslin ajoslin added the in progress Mainly for in progress PRs, but may be used for issues that require multiple PRs label May 6, 2015
@ThomasBurleson ThomasBurleson added this to the 0.10.0 milestone May 6, 2015
@ThomasBurleson ThomasBurleson self-assigned this May 6, 2015
*/
document.addEventListener('click', function clickHijacker(ev) {
var isKeyClick = ev.clientX === 0 && ev.clientY === 0;
if (!isKeyClick && !ev.$material) {
if (!isKeyClick && !ev.$material && !ev.isIonicTap) {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is there a way to make this less specific to Ionic, so we don't have it so closely coupled with Angular Material internals?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Unfortunately I don't know how yet. I agree though, this is not ideal but we can push this and improve it if we find a better alternative.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@marcysutton - great question.
Kenneth and I considered ideas such using GestureProvider to register 'shouldIgnore` callbacks. But for this 1 special case, it seemed more trouble with little ROI.

@ThomasBurleson ThomasBurleson added resolution: fixed and removed in progress Mainly for in progress PRs, but may be used for issues that require multiple PRs labels May 6, 2015
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

shouldHijackClicks does not work (when associated with ionic?)
4 participants