Browse Source

enhance(ux): shift click to expand selected blocks (non-consecutive)

Tienson Qin 3 years ago
parent
commit
55bd894230
1 changed files with 3 additions and 1 deletions
  1. 3 1
      src/main/frontend/components/block.cljs

+ 3 - 1
src/main/frontend/components/block.cljs

@@ -1921,7 +1921,9 @@
     (if (and meta? (not (state/get-edit-input-id)))
     (if (and meta? (not (state/get-edit-input-id)))
       (do
       (do
         (util/stop e)
         (util/stop e)
-        (state/conj-selection-block! (gdom/getElement block-id) :down))
+        (state/conj-selection-block! (gdom/getElement block-id) :down)
+        (when (and block-id (not (state/get-selection-start-block)))
+          (state/set-selection-start-block! block-id)))
       (when (contains? #{1 0} button)
       (when (contains? #{1 0} button)
         (when-not (target-forbidden-edit? target)
         (when-not (target-forbidden-edit? target)
           (cond
           (cond