mirror of
https://github.com/logseq/logseq.git
synced 2026-04-29 08:26:40 +00:00
fix: set the codemirror block as the edited block when it is clicked (#2299)
This commit is contained in:
committed by
GitHub
parent
1173d1ec34
commit
a196ddb8ed
@@ -155,9 +155,11 @@
|
||||
(save-file-or-block-when-blur-or-esc! editor textarea config state))))
|
||||
(.addEventListener element "mousedown"
|
||||
(fn [e]
|
||||
(state/clear-selection!)
|
||||
(util/stop e)
|
||||
(state/set-block-component-editing-mode! true)))
|
||||
(let [block (into {} (db/get-block-by-uuid (:block/uuid config)))]
|
||||
(state/clear-selection!)
|
||||
(state/set-editing! id (.getValue editor) block nil false)
|
||||
(util/stop e)
|
||||
(state/set-block-component-editing-mode! true))))
|
||||
(.save editor)
|
||||
(.refresh editor)))
|
||||
editor)))
|
||||
|
||||
Reference in New Issue
Block a user