Skip to content

Commit 72acb62

Browse files
committed
fix: body tag gets removed from source code when trying to edit a body tag directly
1 parent 1ae042b commit 72acb62

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

src/LiveDevelopment/BrowserScripts/RemoteFunctions.js

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1867,7 +1867,10 @@ function RemoteFunctions(config) {
18671867

18681868
// Function to handle direct editing of elements in the live preview
18691869
function startEditing(element) {
1870-
if (!element) {
1870+
if (!element
1871+
|| element.tagName === "BODY"
1872+
|| element.tagName === "HTML"
1873+
|| !element.hasAttribute("data-brackets-id")) {
18711874
return;
18721875
}
18731876

0 commit comments

Comments
 (0)