Thanks to visit codestin.com
Credit goes to github.com

Skip to content

allow webAgg to report middle click events #18172

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

Merged
merged 3 commits into from
Aug 5, 2020

Conversation

ianhi
Copy link
Contributor

@ianhi ianhi commented Aug 4, 2020

I removed the code in webAgg_core that prevented a user from being able to differentiate between middle click and right click events with a mouse_button_event callback. I removed this forcing of the reported button from 2->3. This code was originally added to account for difficulties in preventing the context menu in chrome 23 #1426 (comment) which in modern chrome should be possible. There was a comment asking to remove mention of this from the MouseEvent docstring, however the current docstring does not seem to mention this so I did not change anything there.

Closes: matplotlib/ipympl#254
Closes: #18171

PR Summary

PR Checklist

  • Has Pytest style unit tests (does remove code require writing a new test?)
  • Code is Flake 8 compliant
  • na New features are documented, with examples if plot related
  • na Documentation is sphinx and numpydoc compliant
  • na Added an entry to doc/users/next_whats_new/ if major new feature (follow instructions in README.rst there)
  • na? Documented in doc/api/next_api_changes/* if API changed in a backward-incompatible way

The current MouseEvent docstring has no mention of this issue so I did not remove anything there. This code was originally added to account for difficulties in preventing the context menu in chrome 23 matplotlib#1426 (comment)
@QuLogic
Copy link
Member

QuLogic commented Aug 4, 2020

The right-click menu should be fixed by #18142, so yes, that comment is outdated.

Copy link
Member

@QuLogic QuLogic left a comment

Choose a reason for hiding this comment

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

Maybe this should get a behavioural change API note?

@ianhi
Copy link
Contributor Author

ianhi commented Aug 4, 2020

I added a note.

The right-click menu should be fixed by #18142,

Only 4 days ago! I guess I got lucky with my timing

Co-authored-by: Elliott Sales de Andrade <[email protected]>
@timhoffm
Copy link
Member

timhoffm commented Aug 5, 2020

Anybody can merge after CI pass.

@timhoffm timhoffm added this to the v3.4.0 milestone Aug 5, 2020
@QuLogic QuLogic merged commit dffc19c into matplotlib:master Aug 5, 2020
@QuLogic
Copy link
Member

QuLogic commented Aug 5, 2020

Thanks @ianhi! Congratulations on your first PR to Matplotlib 🎉 We hope to hear from you again.

@ianhi ianhi deleted the report-button-correctly branch August 5, 2020 15:23
QuLogic added a commit to QuLogic/matplotlib that referenced this pull request Sep 10, 2020
danuo pushed a commit to danuo/matplotlib that referenced this pull request Sep 11, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
3 participants