mirror of
https://github.com/logseq/logseq.git
synced 2026-05-04 19:06:21 +00:00
refactor: switch back to store properties directly in plain-text
This commit is contained in:
@@ -317,14 +317,15 @@
|
||||
(.setSelectionRange input pos pos)))
|
||||
|
||||
#?(:cljs
|
||||
(defn get-caret-pos
|
||||
[input]
|
||||
(try
|
||||
(let [pos ((gobj/get caret-pos "position") input)]
|
||||
(set! pos -rect (.. input (getBoundingClientRect) (toJSON)))
|
||||
(bean/->clj pos))
|
||||
(catch js/Error e
|
||||
(js/console.error e)))))
|
||||
(defn get-caret-pos
|
||||
[input]
|
||||
(when input
|
||||
(try
|
||||
(let [pos ((gobj/get caret-pos "position") input)]
|
||||
(set! pos -rect (.. input (getBoundingClientRect) (toJSON)))
|
||||
(bean/->clj pos))
|
||||
(catch js/Error e
|
||||
(js/console.error e))))))
|
||||
|
||||
(defn get-first-or-last-line-pos
|
||||
[input]
|
||||
|
||||
Reference in New Issue
Block a user