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

fix: prevent parent block duplicate

Yukun Guo 5 лет назад
Родитель
Сommit
04703b8056
1 измененных файлов с 5 добавлено и 0 удалено
  1. 5 0
      src/main/frontend/handler/editor.cljs

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

@@ -645,6 +645,11 @@
                                blocks-container-id (and blocks-container-id
                                blocks-container-id (and blocks-container-id
                                                         (util/uuid-string? blocks-container-id)
                                                         (util/uuid-string? blocks-container-id)
                                                         (medley/uuid blocks-container-id))]
                                                         (medley/uuid blocks-container-id))]
+
+                           ; WORKAROUND: The block won't refresh itself even if the content is empty.
+                           (when edit-self?
+                             (gobj/set input "value" ""))
+
                            (when ok-handler
                            (when ok-handler
                              (ok-handler
                              (ok-handler
                               (if edit-self? (first blocks) (last blocks))))
                               (if edit-self? (first blocks) (last blocks))))