mirror of https://github.com/logseq/logseq
parent
292e86881e
commit
290cd0c131
|
@ -35,12 +35,11 @@
|
|||
(let [target (.. e -target)]
|
||||
;; If the click target is outside of current node
|
||||
(when (and
|
||||
(if (state/editing?) (not (util/input? dom-node)) true)
|
||||
(not (dom/contains dom-node target))
|
||||
(not (.contains (.-classList target) "ignore-outside-event")))
|
||||
(on-hide state e :click))))]
|
||||
(when-not (false? outside?)
|
||||
(listen state js/window "mouseup" click-fn)))
|
||||
(listen state js/window "mousedown" click-fn)))
|
||||
(listen state js/window "keydown"
|
||||
(fn [e]
|
||||
(case (.-keyCode e)
|
||||
|
|
Loading…
Reference in New Issue