chore: use on-click on mobile instead of on-mouse-down

for debugging
pull/1573/head
Tienson Qin 2021-03-31 15:30:45 +08:00
parent ada8cc6a38
commit 317cee6c55
1 changed files with 5 additions and 1 deletions

View File

@ -1397,8 +1397,12 @@
(rum/defc block-content < rum/reactive
[config {:block/keys [uuid title level body meta content marker dummy? page format repo children pre-block? properties collapsed? idx container block-refs-count scheduled scheduled-ast deadline deadline-ast repeated?] :as block} edit-input-id block-id slide?]
(let [dragging? (rum/react *dragging?)
mouse-down-key (if (util/mobile?)
:on-click
:on-mouse-down ; TODO: it seems that Safari doesn't work well with on-mouse-down
)
attrs {:blockid (str uuid)
:on-mouse-down (fn [e]
mouse-down-key (fn [e]
(block-content-on-mouse-down e block block-id properties content format edit-input-id))
:on-drag-over (fn [event] (block-content-on-drag-over event uuid))
:on-drag-leave (fn [_event] (block-content-on-drag-leave uuid))