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

Ignore non-primary mouse input. #23

Merged
merged 1 commit into from
Jul 27, 2015
Merged

Conversation

cdata
Copy link
Contributor

@cdata cdata commented Jul 23, 2015

Addresses PolymerElements/paper-radio-button#33 and probably others.

@cdata cdata force-pushed the ignore-right-click-on-buttons branch from c2e2b09 to 5e0778d Compare July 23, 2015 22:56
_eventSourceIsPrimaryInput: function(event) {
event = event.detail.sourceEvent || event;

// Always true for non-mouse events..
Copy link
Contributor

Choose a reason for hiding this comment

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

Heh, teensy nit: one trailing dot or three. Two is just weird :)

@notwaldorf
Copy link
Contributor

This lgtm, though that buttons api makes me want to cry. Did I read it right that there's three ways to indicate a click?

@cdata
Copy link
Contributor Author

cdata commented Jul 24, 2015

three ways to indicate a click

I had a long session of verbalized disbelief therapy with @azakus about this today. TL;DR MouseEvent be crazy (and this PR doesn't even cover all the crazy).

@cdata cdata force-pushed the ignore-right-click-on-buttons branch from 5e0778d to 4ab92b9 Compare July 24, 2015 06:14
@dfreedm
Copy link
Contributor

dfreedm commented Jul 24, 2015

This looks like something I should maybe handle in gesture directly. Does it ever make sense to get a down or up for a right click?

@notwaldorf
Copy link
Contributor

@azakus @cdata I would say not getting a down or up makes sense to me. The right click is always nommed by the browser to show the context menu, right? I don't think any elements could do anything useful with it so... 🔮

@cdata
Copy link
Contributor Author

cdata commented Jul 27, 2015

@azakus do you mind if we merge this in the mean time, and then take it out when your patch to gestures lands?

@dfreedm
Copy link
Contributor

dfreedm commented Jul 27, 2015

SGTM

cdata added a commit that referenced this pull request Jul 27, 2015
@cdata cdata merged commit cf1a1a7 into master Jul 27, 2015
@cdata cdata deleted the ignore-right-click-on-buttons branch July 27, 2015 17:32
@anthonytordillos
Copy link

Does this also fix PolymerElements/paper-button#24 (marked as a dupe), or should that issue be reopened?

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.

5 participants