Просмотр исходного кода

fix: can't use datepicker for /Deadline

Fixes LOG-3095
Tienson Qin 1 год назад
Родитель
Сommit
eef6ccb883
1 измененных файлов с 3 добавлено и 1 удалено
  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 (editing?)
       (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)
             (let [id (gobj/get elem "id")]
               (when (string/starts-with? id "edit-block-")