Konstantinos Kaloutas il y a 2 ans
Parent
commit
bb80b5f9eb
1 fichiers modifiés avec 5 ajouts et 5 suppressions
  1. 5 5
      src/main/frontend/handler/editor.cljs

+ 5 - 5
src/main/frontend/handler/editor.cljs

@@ -3625,11 +3625,6 @@
         edit-block (state/get-edit-block)
         edit-block (state/get-edit-block)
         target-element (.-nodeName (.-target e))]
         target-element (.-nodeName (.-target e))]
     (cond
     (cond
-      (and (whiteboard?) (not edit-input))
-      (do
-        (util/stop e)
-        (.selectAll (.-api ^js (state/active-tldraw-app))))
-
       ;; editing block fully selected
       ;; editing block fully selected
       (and edit-block edit-input
       (and edit-block edit-input
            (= (util/get-selected-text) (.-value edit-input)))
            (= (util/get-selected-text) (.-value edit-input)))
@@ -3645,6 +3640,11 @@
       (contains? #{"INPUT" "TEXTAREA"} target-element)
       (contains? #{"INPUT" "TEXTAREA"} target-element)
       nil
       nil
 
 
+      (whiteboard?)
+      (do
+        (util/stop e)
+        (.selectAll (.-api ^js (state/active-tldraw-app))))
+
       :else
       :else
       (do
       (do
         (util/stop e)
         (util/stop e)