Skip to content

Commit 26eb06b

Browse files
committed
Fixing issue #5350 by moving the 'false' check to affect only the single click
1 parent f316a7a commit 26eb06b

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

src/components/legend/draw.js

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -465,10 +465,10 @@ function clickOrDoubleClick(gd, legend, legendItem, numClicks, evt) {
465465
evtData.label = legendItem.datum()[0].label;
466466
}
467467

468-
var clickVal = Events.triggerHandler(gd, 'plotly_legendclick', evtData);
469-
if(clickVal === false) return;
470-
471468
if(numClicks === 1) {
469+
var clickVal = Events.triggerHandler(gd, 'plotly_legendclick', evtData);
470+
if(clickVal === false) return;
471+
472472
legend._clickTimeout = setTimeout(function() {
473473
if(!gd._fullLayout) return;
474474
handleClick(legendItem, gd, numClicks);

0 commit comments

Comments
 (0)