Skip to content

Commit

Permalink
Add a ID to the TempDiv, to be able to identify on blur was caused fo…
Browse files Browse the repository at this point in the history
…r copy/cut #2813
  • Loading branch information
BryanValverdeU authored Sep 30, 2024
1 parent 092c04b commit 73809cb
Showing 1 changed file with 3 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -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
*/
Expand Down Expand Up @@ -235,6 +237,7 @@ class CopyPastePlugin implements PluginWithState<CopyPastePluginState> {
div.childNodes.forEach(node => div.removeChild(node));

div.style.display = '';
div.id = TEMP_DIV_ID;
div.focus();

return div;
Expand Down

0 comments on commit 73809cb

Please sign in to comment.