fix: clicking the marker and checkbox can't change in block reference

pull/3630/head
Tienson Qin 2021-12-28 15:33:00 +08:00
parent e64b442653
commit 297e679bd8
1 changed files with 4 additions and 3 deletions

View File

@ -1484,8 +1484,9 @@
:style {:margin-top -2
:margin-right 5}
:checked checked?
:on-change (fn [_e]
;; FIXME: Log timestamp
:on-mouse-down (fn [e]
(util/stop-propagation e))
:on-change (fn [e]
(if checked?
(editor-handler/uncheck block)
(editor-handler/check block)))}))))
@ -1510,7 +1511,7 @@
[:a
{:class (str "marker-switch block-marker " marker)
:title (util/format "Change from %s to %s" marker next-marker)
:on-click (set-marker-fn next-marker)}
:on-mouse-down (set-marker-fn next-marker)}
marker])))
(defn marker-cp