Skip to content

Commit 2e0821c

Browse files
committed
deploy: cd657c3
1 parent c02a73b commit 2e0821c

File tree

87 files changed

+1171
-128
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

87 files changed

+1171
-128
lines changed

LiveDevelopment/BrowserScripts/RemoteFunctions.js

Lines changed: 35 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,9 @@ function RemoteFunctions(config = {}) {
2424
const MessageBroker = window._Brackets_MessageBroker; // to be used by plugins.
2525

2626
const SHARED_STATE = {
27-
__description: "Use this to keep shared state for Live Preview Edit instead of window.*"
27+
__description: "Use this to keep shared state for Live Preview Edit instead of window.*",
28+
_suppressDOMEditDismissal: false,
29+
_suppressDOMEditDismissalTimeout: null
2830
};
2931

3032
let _hoverHighlight;
@@ -1257,10 +1259,19 @@ function RemoteFunctions(config = {}) {
12571259
this.rememberedNodes = {};
12581260

12591261
// this check makes sure that if the element is no more in the DOM then we remove it
1260-
if (previouslySelectedElement && !previouslySelectedElement.isConnected) {
1261-
dismissUIAndCleanupState();
1262+
// skip this check if suppression is active (e.g., when some internal feature updates source)
1263+
if (!SHARED_STATE._suppressDOMEditDismissal) {
1264+
if (previouslySelectedElement && !previouslySelectedElement.isConnected) {
1265+
dismissUIAndCleanupState();
1266+
} else {
1267+
redrawEverything();
1268+
}
12621269
} else {
1263-
redrawEverything();
1270+
// Suppression is active - re-apply outline since attrChange may have wiped it
1271+
if (previouslySelectedElement && previouslySelectedElement.isConnected) {
1272+
const outlineColor = previouslySelectedElement.hasAttribute(GLOBALS.DATA_BRACKETS_ID_ATTR) ? "#4285F4" : "#3C3F41";
1273+
previouslySelectedElement.style.outline = `1px solid ${outlineColor}`;
1274+
}
12641275
}
12651276
};
12661277

@@ -1335,6 +1346,24 @@ function RemoteFunctions(config = {}) {
13351346
}
13361347
}
13371348

1349+
/**
1350+
* Temporarily suppress the DOM edit dismissal check in apply()
1351+
* Used when source is modified from UI panels to prevent
1352+
* the panel from being dismissed when the DOM is updated.
1353+
* @param {Number} durationMs - Duration in milliseconds to suppress (default 100)
1354+
*/
1355+
function suppressDOMEditDismissal(durationMs) {
1356+
durationMs = durationMs || 100;
1357+
if (SHARED_STATE._suppressDOMEditDismissalTimeout) {
1358+
clearTimeout(SHARED_STATE._suppressDOMEditDismissalTimeout);
1359+
}
1360+
SHARED_STATE._suppressDOMEditDismissal = true;
1361+
SHARED_STATE._suppressDOMEditDismissalTimeout = setTimeout(function() {
1362+
SHARED_STATE._suppressDOMEditDismissal = false;
1363+
SHARED_STATE._suppressDOMEditDismissalTimeout = null;
1364+
}, durationMs);
1365+
}
1366+
13381367
/**
13391368
* This function dismisses all UI elements and cleans up application state
13401369
* Called when user presses Esc key, clicks on HTML/Body tags, or other dismissal events
@@ -1425,7 +1454,8 @@ function RemoteFunctions(config = {}) {
14251454
"updateConfig": updateConfig,
14261455
"dismissUIAndCleanupState": dismissUIAndCleanupState,
14271456
"escapeKeyPressInEditor": _handleEscapeKeyPress,
1428-
"getMode": function() { return config.mode; }
1457+
"getMode": function() { return config.mode; },
1458+
"suppressDOMEditDismissal": suppressDOMEditDismissal
14291459
};
14301460

14311461
// the below code comment is replaced by added scripts for extensibility

LiveDevelopment/main.js

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

appConfig.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@ window.AppConfig = {
3535
"app_update_url": "https://updates.phcode.io/tauri/update-latest-pre-release.json",
3636
"extensionTakedownURL": "https://updates.phcode.io/extension_takedown.json",
3737
"linting.enabled_by_default": true,
38-
"build_timestamp": "2026-02-13T15:47:28.355Z",
38+
"build_timestamp": "2026-02-15T12:51:56.406Z",
3939
"googleAnalyticsID": "G-FP5S9BKDSJ",
4040
"googleAnalyticsIDDesktop": "G-D5R1Y6PTS8",
4141
"mixPanelID": "a7e08ffd43c37767c29b13df1d2e6c62",
@@ -47,7 +47,7 @@ window.AppConfig = {
4747
"bugsnagEnv": "staging"
4848
},
4949
"name": "Phoenix Code",
50-
"version": "5.1.4-22023",
50+
"version": "5.1.4-22030",
5151
"apiVersion": "5.1.4",
5252
"homepage": "https://core.ai",
5353
"issues": {

assets/default-project/en.zip

0 Bytes
Binary file not shown.

assets/sample-projects/HTML5.zip

0 Bytes
Binary file not shown.
0 Bytes
Binary file not shown.
0 Bytes
Binary file not shown.

assets/sample-projects/explore.zip

0 Bytes
Binary file not shown.
0 Bytes
Binary file not shown.

brackets.js

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)