Selaa lähdekoodia

fix: copy block-ref instantly after input text lost block content

close #7541
Tienson Qin 2 vuotta sitten
vanhempi
sitoutus
df2845b398
1 muutettua tiedostoa jossa 1 lisäystä ja 0 poistoa
  1. 1 0
      src/main/frontend/handler/editor.cljs

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

@@ -3005,6 +3005,7 @@
       (let [input (state/get-input)
             selected-start (util/get-selection-start input)
             selected-end (util/get-selection-end input)]
+        (save-current-block!)
         (if (= selected-start selected-end)
           (copy-current-block-ref "ref")
           (js/document.execCommand "copy")))