Selaa lähdekoodia

fix: an experiment on portal editing

Peng Xiao 3 vuotta sitten
vanhempi
sitoutus
fe8679da2e

+ 1 - 1
tldraw/apps/tldraw-logseq/src/lib/shapes/LogseqPortalShape.tsx

@@ -721,7 +721,7 @@ export class LogseqPortalShape extends TLBoxShape<LogseqPortalShapeProps> {
           style={{
             width: '100%',
             height: '100%',
-            pointerEvents: isEditing ? 'all' : 'none',
+            pointerEvents: !isMoving && (isEditing || isSelected) ? 'all' : 'none',
           }}
         >
           {isCreating ? (

+ 3 - 0
tldraw/packages/core/src/lib/tools/TLSelectTool/states/TranslatingState.ts

@@ -104,6 +104,9 @@ export class TranslatingState<
     )
     this.initialPoints = this.initialShapePoints
 
+    // Blur all inputs when moving shapes
+    document.querySelectorAll<HTMLElement>('input,textarea').forEach(el => el.blur())
+
     if (inputs.altKey) {
       this.startCloning()
     } else {