From 7132a5410b2b1538017ddeaed82c8da04b8dd4ee Mon Sep 17 00:00:00 2001 From: abose Date: Fri, 9 Jan 2026 11:28:00 +0530 Subject: [PATCH 1/3] chore: handle escape key press in popped out live preview --- .../BrowserScripts/RemoteFunctions.js | 17 ++++++++++++----- 1 file changed, 12 insertions(+), 5 deletions(-) diff --git a/src/LiveDevelopment/BrowserScripts/RemoteFunctions.js b/src/LiveDevelopment/BrowserScripts/RemoteFunctions.js index 0e8917a1c..ff49ee751 100644 --- a/src/LiveDevelopment/BrowserScripts/RemoteFunctions.js +++ b/src/LiveDevelopment/BrowserScripts/RemoteFunctions.js @@ -73,7 +73,7 @@ function RemoteFunctions(config = {}) { "reRegisterEventHandlers", "handleClick", // handle click on an icon in the tool box. // when escape key is presses in the editor, we may need to dismiss the live edit boxes. - "handleEscapePressFromEditor", + "handleEscapePress", // interaction blocks acts as 'kill switch' to block all kinds of click handlers // this is done so that links or buttons doesn't perform their natural operation in edit mode "registerInteractionBlocker", // to block @@ -1364,16 +1364,23 @@ function RemoteFunctions(config = {}) { }); } - function _escapeKeyPressInEditor() { + function _handleEscapeKeyPress() { enableHoverListeners(); // so that if hover lock is there it will get cleared dismissUIAndCleanupState(); getAllToolHandlers().forEach(handler => { - if (handler.handleEscapePressFromEditor) { - handler.handleEscapePressFromEditor(); + if (handler.handleEscapePress) { + handler.handleEscapePress(); } }); } + document.addEventListener('keydown', function(event) { + if (config.mode === 'edit' && (event.key === 'Escape' || event.key === 'Esc')) { + event.preventDefault(); + _handleEscapeKeyPress(); + } + }); + // we need to refresh the config once the load is completed // this is important because messageBroker gets ready for use only when load fires window.addEventListener('load', function() { @@ -1397,7 +1404,7 @@ function RemoteFunctions(config = {}) { "applyDOMEdits": applyDOMEdits, "updateConfig": updateConfig, "dismissUIAndCleanupState": dismissUIAndCleanupState, - "escapeKeyPressInEditor": _escapeKeyPressInEditor, + "escapeKeyPressInEditor": _handleEscapeKeyPress, "getMode": function() { return config.mode; } }; From fcf2c1aef38c38fc6dbe36468ac197bfb40b23e0 Mon Sep 17 00:00:00 2001 From: abose Date: Fri, 9 Jan 2026 11:29:40 +0530 Subject: [PATCH 2/3] test: pr pro dep --- tracking-repos.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tracking-repos.json b/tracking-repos.json index f52175959..ae08b2a1e 100644 --- a/tracking-repos.json +++ b/tracking-repos.json @@ -1,5 +1,5 @@ { "phoenixPro": { - "commitID": "ef4bccd6680a3eda8695a59f441adc0e3c3f1503" + "commitID": "2c12d4f672c1a63a5435c712cb090f642e7e1797" } } From e028683a30e33061b983805bc21ab88d61243f15 Mon Sep 17 00:00:00 2001 From: abose Date: Fri, 9 Jan 2026 12:42:04 +0530 Subject: [PATCH 3/3] chore: update pro dep --- tracking-repos.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tracking-repos.json b/tracking-repos.json index ae08b2a1e..223c969bf 100644 --- a/tracking-repos.json +++ b/tracking-repos.json @@ -1,5 +1,5 @@ { "phoenixPro": { - "commitID": "2c12d4f672c1a63a5435c712cb090f642e7e1797" + "commitID": "42a00d0775203749b8c5088ad78e7aa1d48e7f3d" } }