mirror of
https://github.com/logseq/logseq.git
synced 2026-05-25 13:14:39 +00:00
fix: the popup position is sometimes wrong
This commit is contained in:
committed by
Gabriel Horner
parent
8b9c64af6e
commit
3a362c2ecd
@@ -408,7 +408,7 @@
|
||||
(when set-default-width?
|
||||
{:width max-width})
|
||||
(let [^js/HTMLElement textarea
|
||||
(js/document.querySelector "textarea")]
|
||||
(js/document.querySelector "textarea.ls-textarea")]
|
||||
(if (<= (.-clientWidth textarea) (+ left (if set-default-width? max-width 500)))
|
||||
{:right 0}
|
||||
{:left (if (and y-diff (= y-diff 0)) left 0)})))}
|
||||
@@ -476,6 +476,7 @@
|
||||
(let [content (if content (str content) "")]
|
||||
;; as the function is binding to the editor content, optimization is welcome
|
||||
(str
|
||||
"ls-textarea "
|
||||
(if (or (> (.-length content) 1000)
|
||||
(string/includes? content "\n"))
|
||||
"multiline-block"
|
||||
|
||||
Reference in New Issue
Block a user