|
@@ -1028,6 +1028,13 @@ class App extends React.Component<ExcalidrawProps, AppState> {
|
|
});
|
|
});
|
|
|
|
|
|
private onCopy = withBatchedUpdates((event: ClipboardEvent) => {
|
|
private onCopy = withBatchedUpdates((event: ClipboardEvent) => {
|
|
|
|
+ const activeSelection = document.getSelection();
|
|
|
|
+ if (
|
|
|
|
+ activeSelection?.anchorNode &&
|
|
|
|
+ !this.excalidrawContainerRef.current!.contains(activeSelection.anchorNode)
|
|
|
|
+ ) {
|
|
|
|
+ return;
|
|
|
|
+ }
|
|
if (isWritableElement(event.target)) {
|
|
if (isWritableElement(event.target)) {
|
|
return;
|
|
return;
|
|
}
|
|
}
|