Browse Source

fix: prevent parent block duplicate

Yukun Guo 5 years ago
parent
commit
04703b8056
1 changed files with 5 additions and 0 deletions
  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
                                                         (util/uuid-string? 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
                              (ok-handler
                               (if edit-self? (first blocks) (last blocks))))