mirror of
https://github.com/logseq/logseq.git
synced 2026-05-03 02:16:30 +00:00
fix(mobile): wrong cursor restore when indent or outdent
This commit is contained in:
@@ -176,8 +176,11 @@
|
||||
(when-let [node (gdom/getElement (str id))]
|
||||
(when-let [cursor-range (state/get-cursor-range)]
|
||||
(when-let [range cursor-range]
|
||||
(let [pos (diff/find-position markup range)]
|
||||
(cursor/move-cursor-to node pos))))))
|
||||
(let [pos (:editor/pos @state/state)
|
||||
pos (or pos (diff/find-position markup range))]
|
||||
(cursor/move-cursor-to node pos)
|
||||
(state/set-state! :editor/pos nil))))))
|
||||
|
||||
|
||||
(defn highlight-block!
|
||||
[block-uuid]
|
||||
|
||||
Reference in New Issue
Block a user