From 04703b8056d33b64ef45c63b824c49a80eb597a0 Mon Sep 17 00:00:00 2001 From: Yukun Guo Date: Fri, 11 Dec 2020 22:58:45 +0800 Subject: [PATCH] fix: prevent parent block duplicate --- src/main/frontend/handler/editor.cljs | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/src/main/frontend/handler/editor.cljs b/src/main/frontend/handler/editor.cljs index 54743c6e4..a2b0e5a80 100644 --- a/src/main/frontend/handler/editor.cljs +++ b/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))))