Skip to content

Commit 1522b68

Browse files
committed
gl2d: add user-select-none class to canvas
- 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
1 parent de6a183 commit 1522b68

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

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)