diff --git a/src/libs/Clipboard/index.js b/src/libs/Clipboard/index.js index 0cd659b1a148..b770b2f2c787 100644 --- a/src/libs/Clipboard/index.js +++ b/src/libs/Clipboard/index.js @@ -29,10 +29,9 @@ function setHTMLSync(html, text) { document.body.appendChild(node); const selection = window.getSelection(); - let originalSelection = null; const firstAnchorChild = selection.anchorNode && selection.anchorNode.firstChild; const isComposer = firstAnchorChild instanceof HTMLTextAreaElement; - + let originalSelection = null; if (isComposer) { originalSelection = { start: firstAnchorChild.selectionStart,