fix: collapse select issue

pull/1819/head
Weihua Lu 2021-04-29 21:41:38 +08:00
parent 986c993dfe
commit 14638ff6b9
1 changed files with 4 additions and 1 deletions

View File

@ -789,7 +789,10 @@
#?(:cljs
(defn get-blocks-noncollapse []
(->> (d/by-class "ls-block")
(filter (fn [b] (not= "none" (d/style b "display")))))))
(filter (fn [b]
(if-let [parent (gdom/getParentElement b)]
(not= "none" (d/style parent "display"))
false))))))
;; Take the idea from https://stackoverflow.com/questions/4220478/get-all-dom-block-elements-for-selected-texts.
;; FIXME: Note that it might not works for IE.