Pārlūkot izejas kodu

fix: Revert `906faaf0` #3206 (#3269)

vanilla_orig
David Luzar 4 gadus atpakaļ
vecāks
revīzija
c1379c3c10
Revīzijas autora e-pasta adrese nav piesaistīta nevienam kontam
3 mainītis faili ar 1 papildinājumiem un 9 dzēšanām
  1. 1
    1
      src/actions/actionClipboard.tsx
  2. 0
    7
      src/components/App.tsx
  3. 0
    1
      src/keys.ts

+ 1
- 1
src/actions/actionClipboard.tsx Parādīt failu

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

+ 0
- 7
src/components/App.tsx Parādīt failu

@@ -1047,13 +1047,6 @@ class App extends React.Component<ExcalidrawProps, AppState> {
1047 1047
   });
1048 1048
 
1049 1049
   private onCopy = withBatchedUpdates((event: ClipboardEvent) => {
1050
-    const activeSelection = document.getSelection();
1051
-    if (
1052
-      activeSelection?.anchorNode &&
1053
-      !this.excalidrawContainerRef.current!.contains(activeSelection.anchorNode)
1054
-    ) {
1055
-      return;
1056
-    }
1057 1050
     if (isWritableElement(event.target)) {
1058 1051
       return;
1059 1052
     }

+ 0
- 1
src/keys.ts Parādīt failu

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

Notiek ielāde…
Atcelt
Saglabāt