Skip to content

Commit 87a83e9

Browse files
authored
Merge pull request #958 from plotly/gl2d-double-click
Sanitise gl2d double-click interactions
2 parents 69fe83b + 1522b68 commit 87a83e9

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

Diff for: src/plots/gl2d/scene2d.js

+5
Original file line numberDiff line numberDiff line change
@@ -137,6 +137,11 @@ proto.makeFramework = function() {
137137
canvas.style.left = '0px';
138138
canvas.style['pointer-events'] = 'none';
139139

140+
// disabling user select on the canvas
141+
// sanitizes double-clicks interactions
142+
// ref: https://github.com/plotly/plotly.js/issues/744
143+
canvas.className += 'user-select-none';
144+
140145
// create SVG container for hover text
141146
var svgContainer = this.svgContainer = document.createElementNS(
142147
'http://www.w3.org/2000/svg',

0 commit comments

Comments
 (0)