Skip to content

Commit d2c43f3

Browse files
committed
fix: prevent dirty icon marker from flashing when no content change is made
1 parent ea34621 commit d2c43f3

File tree

1 file changed

+6
-1
lines changed

1 file changed

+6
-1
lines changed

src/LiveDevelopment/BrowserScripts/RemoteFunctions.js

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3043,7 +3043,12 @@ function RemoteFunctions(config = {}) {
30433043
isEscapePressed = true;
30443044
// Cancel editing
30453045
event.preventDefault();
3046-
finishEditing(element, false); // false means that the edit operation was cancelled
3046+
const newContent = element.textContent;
3047+
if (oldContent !== newContent) {
3048+
finishEditing(element, false); // false means that the edit operation was cancelled
3049+
} else { // no content change we can avoid sending details to the editor
3050+
finishEditingCleanup(element);
3051+
}
30473052
} else if (event.key === "Enter" && !event.shiftKey) {
30483053
isEscapePressed = false;
30493054
// Finish editing on Enter (unless Shift is held)

0 commit comments

Comments
 (0)