Pārlūkot izejas kodu

fix: copy-selection-blocks has reversed direction

rcmerci 4 gadi atpakaļ
vecāks
revīzija
414cb9f017
1 mainītis faili ar 3 papildinājumiem un 0 dzēšanām
  1. 3 0
      src/main/frontend/handler/editor.cljs

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

@@ -889,6 +889,9 @@
           ids (->> (distinct (map #(when-let [id (dom/attr % "blockid")]
                                      (uuid id)) blocks))
                    (remove nil?))
+          ids (if (= :up (state/get-selection-direction))
+                (reverse ids)
+                ids)
           [content tree] (compose-copied-blocks-contents-&-block-tree repo ids)]
       (common-handler/copy-to-clipboard-without-id-property! content)
       (state/set-copied-blocks content tree))))