Procházet zdrojové kódy

Merge pull request #896 from logseq/fix/parent-block-duplicate

fix: prevent parent block duplicate
Tienson Qin před 5 roky
rodič
revize
e200564388
1 změnil soubory, kde provedl 5 přidání a 0 odebrání
  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))))