diff --git a/src/main/frontend/handler/block.cljs b/src/main/frontend/handler/block.cljs index 569a20776f..799818d213 100644 --- a/src/main/frontend/handler/block.cljs +++ b/src/main/frontend/handler/block.cljs @@ -360,15 +360,15 @@ (when (or select? swiped?) (dom/set-style! block-container :transform "translateX(0)") (when select? - (if (contains? (set (state/get-selection-blocks)) block-container) + (if (contains? (set (state/get-selection-block-ids)) (some-> (.getAttribute block-container "blockid") uuid)) (state/drop-selection-block! block-container) (do (state/clear-edit!) (state/conj-selection-block! block-container nil))) - (when (seq (state/get-selection-blocks)) + (if (seq (state/get-selection-blocks)) (state/set-state! :mobile/show-action-bar? true) - ;; (state/set-state! :mobile/actioned-block ) - ) + (when (:mobile/show-action-bar? @state/state) + (state/set-state! :mobile/show-action-bar? false))) (haptics/haptics))) (reset! *swiped? false) (catch :default e diff --git a/src/main/frontend/state.cljs b/src/main/frontend/state.cljs index 409f010dcf..c85f1dfe4b 100644 --- a/src/main/frontend/state.cljs +++ b/src/main/frontend/state.cljs @@ -1271,7 +1271,7 @@ Similar to re-frame subscriptions" (defn drop-selection-block! [block] - (set-selection-blocks-aux! (-> (remove #(= block %) (get-unsorted-selection-blocks)) + (set-selection-blocks-aux! (-> (remove #(= (.-id block) (.-id %)) (get-unsorted-selection-blocks)) vec))) (defn drop-selection-blocks-starts-with!