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

Sanitise gl2d double-click interactions #958

Merged
merged 1 commit into from
Sep 21, 2016
Merged

Conversation

etpinard
Copy link
Contributor

resolves #744

Off this branch, double-clicking on the canvas now no longer puts the select-box in a weird state.

This solution was discovered by @dfcreative , I made a PR here to potential make this fix part of the 1.17.3 patch release.

- this sanitizes double clicks interactions
- e.g. double-click on the canvas now no longer puts
  the select-box in a weird state
- see #744 for more info
// disabling user select on the canvas
// sanitizes double-clicks interactions
// ref: https://github.com/plotly/plotly.js/issues/744
canvas.className += 'user-select-none';
Copy link
Contributor Author

Choose a reason for hiding this comment

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

@dfcreative I chose to add the 'user-select-none' class to the gl2d <canvas> nodes only to be safe - that way this patch won't affect the other plot types that use the gl-container div.

@etpinard etpinard merged commit 87a83e9 into master Sep 21, 2016
@etpinard etpinard deleted the gl2d-double-click branch September 21, 2016 17:07
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Double click on "scattergl" plot makes panning option not to work properly
1 participant