mirror of
https://github.com/excalidraw/excalidraw.git
synced 2025-04-14 16:40:58 -04:00
parent
70c36e196c
commit
c1379c3c10
3 changed files with 1 additions and 9 deletions
|
@ -17,7 +17,7 @@ export const actionCopy = register({
|
||||||
};
|
};
|
||||||
},
|
},
|
||||||
contextItemLabel: "labels.copy",
|
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({
|
export const actionCut = register({
|
||||||
|
|
|
@ -1047,13 +1047,6 @@ 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;
|
||||||
}
|
}
|
||||||
|
|
|
@ -40,7 +40,6 @@ export const KEYS = {
|
||||||
TAB: "Tab",
|
TAB: "Tab",
|
||||||
|
|
||||||
A: "a",
|
A: "a",
|
||||||
C: "c",
|
|
||||||
D: "d",
|
D: "d",
|
||||||
E: "e",
|
E: "e",
|
||||||
L: "l",
|
L: "l",
|
||||||
|
|
Loading…
Add table
Reference in a new issue