mirror of
https://github.com/logseq/logseq.git
synced 2026-04-26 07:05:10 +00:00
fix: calc result overlaps with input text when the latter is very long
close #4147
This commit is contained in:
@@ -294,13 +294,15 @@
|
||||
(when-not (= mode "calc")
|
||||
[:div.extensions__code-lang
|
||||
(string/lower-case mode)]))
|
||||
[:textarea (merge {:id id
|
||||
;; Expose the textarea associated with the CodeMirror instance via
|
||||
;; ref so that we can autofocus into the CodeMirror instance later.
|
||||
:ref textarea-ref-name
|
||||
:default-value code} attr)]
|
||||
(when (= (:data-lang attr) "calc")
|
||||
(calc/results (:calc-atom state)))])
|
||||
[:div.flex.flex-1.flex-row
|
||||
[:div.w-full
|
||||
[:textarea (merge {:id id
|
||||
;; Expose the textarea associated with the CodeMirror instance via
|
||||
;; ref so that we can autofocus into the CodeMirror instance later.
|
||||
:ref textarea-ref-name
|
||||
:default-value code} attr)]]
|
||||
(when (= (:data-lang attr) "calc")
|
||||
(calc/results (:calc-atom state)))]])
|
||||
|
||||
;; Focus into the CodeMirror editor rather than the normal "raw" editor
|
||||
(defmethod commands/handle-step :codemirror/focus [[_]]
|
||||
|
||||
Reference in New Issue
Block a user