From 919f440258bbaa5eed3fd99d09ab76891d8e50c4 Mon Sep 17 00:00:00 2001 From: Pluto Date: Thu, 8 Jan 2026 14:00:33 +0530 Subject: [PATCH] fix: hover listeners affecting inline editing --- src/LiveDevelopment/BrowserScripts/RemoteFunctions.js | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/src/LiveDevelopment/BrowserScripts/RemoteFunctions.js b/src/LiveDevelopment/BrowserScripts/RemoteFunctions.js index ff49ee751..8d3e86231 100644 --- a/src/LiveDevelopment/BrowserScripts/RemoteFunctions.js +++ b/src/LiveDevelopment/BrowserScripts/RemoteFunctions.js @@ -718,6 +718,14 @@ function RemoteFunctions(config = {}) { } function enableHoverListeners() { + // don't enable hover listeners if user is currently editing an element + // this was added to fix a specific bug: + // lets say user double clicked an element: so as soon as the first click is made, + // 'breiflyDisableHoverListeners' is called which has a timer to re-enable hover listeners, + // because of which even during editing the hover listeners were working + if (SHARED_STATE._currentlyEditingElement) { + return; + } if (config.mode === 'edit' && shouldShowHighlightOnHover()) { disableHoverListeners(); window.document.addEventListener("mouseover", onElementHover);