clear selection on htmlRender (#544)

This commit is contained in:
Aleh Khantsevich
2025-02-04 21:47:49 +01:00
committed by GitHub
parent fcaf62ecf7
commit ab3f65edfa

View File

@@ -35,8 +35,13 @@
// Called when rendering a new email for the first time
function RenderHTML(htmlString, shouldLinkifyText = true) {
// Reset scroll to top
window.scroll(0, 0);
// Clear any existing selection
window.getSelection().removeAllRanges();
_htmlString = htmlString;
_shouldLinkifyText = shouldLinkifyText;