ソースを参照

fix: disable delete shortcut while editing

Konstantinos Kaloutas 3 年 前
コミット
da66d0f20f
1 ファイル変更4 行追加2 行削除
  1. 4 2
      tldraw/packages/core/src/lib/TLApp/TLApp.ts

+ 4 - 2
tldraw/packages/core/src/lib/TLApp/TLApp.ts

@@ -177,8 +177,10 @@ export class TLApp<
       {
       {
         keys: ['del', 'backspace'],
         keys: ['del', 'backspace'],
         fn: () => {
         fn: () => {
-          this.api.deleteShapes()
-          this.selectedTool.transition('idle')
+          if (!this.editingShape) {
+            this.api.deleteShapes()
+            this.selectedTool.transition('idle')
+          }
         },
         },
       },
       },
       {
       {