diff --git a/conda/js/src/components/toolchain/ToolchainEditor.jsx b/conda/js/src/components/toolchain/ToolchainEditor.jsx index a6dbe35ba4297c7cd84708fb084071d3402f9172..444cd63d8747f432f33359a4780399ea4d4de713 100644 --- a/conda/js/src/components/toolchain/ToolchainEditor.jsx +++ b/conda/js/src/components/toolchain/ToolchainEditor.jsx @@ -882,16 +882,23 @@ export class ToolchainEditor extends React.PureComponent<Props, State> { } } + lastClickMs = 0 // handles left clicking on a block handleBlockClick = (blockName: string, set: BlockSet) => { - const newMBI = { - set, - name: blockName, - active: true, - }; - this.setState({ - modalBlockInfo: newMBI, - }); + const currTime = Date.now(); + // 1sec throttling + const delay = 1000; + if(currTime - this.lastClickMs > delay){ + const newMBI = { + set, + name: blockName, + active: true, + }; + this.setState({ + modalBlockInfo: newMBI, + }); + } + this.lastClickMs = currTime; } // uses the server's /layout endpoint to get a graphviz layout for this toolchain