Просмотр исходного кода

fix: copy-selection-blocks has reversed direction

rcmerci 4 лет назад
Родитель
Сommit
414cb9f017
1 измененных файлов с 3 добавлено и 0 удалено
  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))))