diff --git a/packages/bruno-app/src/utils/codemirror/brunoVarInfo.js b/packages/bruno-app/src/utils/codemirror/brunoVarInfo.js index d91db337..c5cf174e 100644 --- a/packages/bruno-app/src/utils/codemirror/brunoVarInfo.js +++ b/packages/bruno-app/src/utils/codemirror/brunoVarInfo.js @@ -93,9 +93,6 @@ if (!SERVER_RENDERED) { const box = target.getBoundingClientRect(); - const hoverTime = getHoverTime(cm); - state.hoverTimeout = setTimeout(onHover, hoverTime); - const onMouseMove = function () { clearTimeout(state.hoverTimeout); state.hoverTimeout = setTimeout(onHover, hoverTime); @@ -115,6 +112,9 @@ if (!SERVER_RENDERED) { onMouseHover(cm, box); }; + const hoverTime = getHoverTime(cm); + state.hoverTimeout = setTimeout(onHover, hoverTime); + CodeMirror.on(document, 'mousemove', onMouseMove); CodeMirror.on(cm.getWrapperElement(), 'mouseout', onMouseOut); }