Przeglądaj źródła

fix(timestamp): clear editing state before setting timestamp

If editing state is on in other block, submitting the timestamp to
current block will also add a timestamp to the block.
leizhe 4 lat temu
rodzic
commit
2694568f70
1 zmienionych plików z 1 dodań i 1 usunięć
  1. 1 1
      src/main/frontend/components/datetime.cljs

+ 1 - 1
src/main/frontend/components/datetime.cljs

@@ -108,10 +108,10 @@
                                      block-id (or (:block/uuid (state/get-edit-block))
                                                   (:block/uuid block))
                                      typ (or @commands/*current-command typ)]
+                                 (state/clear-edit!)
                                  (editor-handler/set-block-timestamp! block-id
                                                                       typ
                                                                       text)
-                                 (state/clear-edit!)
                                  (when show?
                                    (reset! show? false))))
                              (clear-timestamp!)