Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Check source capabilities to distinguish touches vs mouse #2051

Merged
merged 1 commit into from
Feb 16, 2016

Conversation

dvoytenko
Copy link
Contributor

Closes #1995.

@cramforce
Copy link
Member

LGTM

@erwinmombay
Copy link
Member

@dvoytenko LGTM

// The event explicitly states that it's a result of a touch event.
if (e.sourceCapabilities && e.sourceCapabilities.firesTouchEvents) {
this.mouseCanceled_();
return undefined;
Copy link
Contributor

Choose a reason for hiding this comment

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

remove ?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Remove what, sorry?

Copy link
Contributor

Choose a reason for hiding this comment

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

oh i thought the function ended here -

just return; (would return undefined)

Copy link
Contributor Author

Choose a reason for hiding this comment

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

It's fine. Here I'd like to be explicit since below it returns the actual value. Uglifier will likely strip it.

dvoytenko added a commit that referenced this pull request Feb 16, 2016
Check source capabilities to distinguish touches vs mouse
@dvoytenko dvoytenko merged commit bf39315 into ampproject:master Feb 16, 2016
@dvoytenko dvoytenko deleted the mouse-touch-emul branch February 16, 2016 21:25
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants