1
0
mirror of https://github.com/excalidraw/excalidraw.git synced 2024-11-02 03:25:53 +01:00

fix: Revert 906faaf0 #3206 (#3269)

This commit is contained in:
David Luzar 2021-03-17 14:43:58 +01:00 committed by GitHub
parent 70c36e196c
commit c1379c3c10
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 1 additions and 9 deletions

@ -17,7 +17,7 @@ export const actionCopy = register({
};
},
contextItemLabel: "labels.copy",
// Don't assign keyTest since its handled via copy event
keyTest: (event) => event[KEYS.CTRL_OR_CMD] && event.code === CODES.C,
});
export const actionCut = register({

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

@ -40,7 +40,6 @@ export const KEYS = {
TAB: "Tab",
A: "a",
C: "c",
D: "d",
E: "e",
L: "l",