diff --git a/packages/roosterjs-content-model-core/lib/corePlugin/copyPaste/CopyPastePlugin.ts b/packages/roosterjs-content-model-core/lib/corePlugin/copyPaste/CopyPastePlugin.ts index b0fd0c791d9..62ba6d1248e 100644 --- a/packages/roosterjs-content-model-core/lib/corePlugin/copyPaste/CopyPastePlugin.ts +++ b/packages/roosterjs-content-model-core/lib/corePlugin/copyPaste/CopyPastePlugin.ts @@ -33,6 +33,8 @@ import type { ReadonlyTableSelectionContext, } from 'roosterjs-content-model-types'; +const TEMP_DIV_ID = 'roosterJS_copyCutTempDiv'; + /** * Copy and paste plugin for handling onCopy and onPaste event */ @@ -235,6 +237,7 @@ class CopyPastePlugin implements PluginWithState { div.childNodes.forEach(node => div.removeChild(node)); div.style.display = ''; + div.id = TEMP_DIV_ID; div.focus(); return div;