Przeglądaj źródła

fix: can't use datepicker for /Deadline

Fixes LOG-3095
Tienson Qin 1 rok temu
rodzic
commit
eef6ccb883
1 zmienionych plików z 3 dodań i 1 usunięć
  1. 3 1
      src/main/frontend/state.cljs

+ 3 - 1
src/main/frontend/state.cljs

@@ -1028,7 +1028,9 @@ Similar to re-frame subscriptions"
   (when-not (exists? js/process)
   (when-not (exists? js/process)
     (when (editing?)
     (when (editing?)
       (try
       (try
-        (when-let [elem js/document.activeElement]
+        (when-let [elem (or (when-let [id (:block/uuid (get-edit-block))]
+                              (gdom/getElement (str "edit-block-" id)))
+                            js/document.activeElement)]
           (when (util/input? elem)
           (when (util/input? elem)
             (let [id (gobj/get elem "id")]
             (let [id (gobj/get elem "id")]
               (when (string/starts-with? id "edit-block-")
               (when (string/starts-with? id "edit-block-")