Skip to content

Commit bc6972d

Browse files
committed
fix: flicker issue after hyperlink edit completes
1 parent ba916ab commit bc6972d

File tree

2 files changed

+7
-1
lines changed

2 files changed

+7
-1
lines changed

src/LiveDevelopment/BrowserScripts/RemoteFunctions.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1921,7 +1921,7 @@ function RemoteFunctions(config = {}) {
19211921
});
19221922
}
19231923

1924-
dismissUIAndCleanupState();
1924+
this.remove();
19251925
},
19261926

19271927
remove: function() {

src/LiveDevelopment/LivePreviewEdit.js

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -819,6 +819,12 @@ define(function (require, exports, module) {
819819
editor.document.batchOperation(function () {
820820
editor.replaceRange(updatedElementText, startPos, endPos);
821821
});
822+
823+
// dismiss all UI boxes including the image ribbon gallery
824+
const currLiveDoc = LiveDevMultiBrowser.getCurrentLiveDoc();
825+
if (currLiveDoc && currLiveDoc.protocol && currLiveDoc.protocol.evaluate) {
826+
currLiveDoc.protocol.evaluate("_LD.dismissUIAndCleanupState()");
827+
}
822828
}
823829
}
824830

0 commit comments

Comments
 (0)