mirror of
https://github.com/logseq/logseq.git
synced 2026-05-01 09:26:28 +00:00
Merge remote-tracking branch 'upstream/master' into whiteboards
This commit is contained in:
@@ -1771,19 +1771,11 @@
|
||||
(defn close-autocomplete-if-outside
|
||||
[input]
|
||||
(when (and input
|
||||
(state/get-editor-action)
|
||||
(not (wrapped-by? input page-ref/left-brackets page-ref/right-brackets)))
|
||||
(let [value (gobj/get input "value")
|
||||
pos (state/get-editor-last-pos)
|
||||
current-pos (cursor/pos input)
|
||||
between (gp-util/safe-subs value (min pos current-pos) (max pos current-pos))]
|
||||
(when (and between
|
||||
(or
|
||||
(string/includes? between "[")
|
||||
(string/includes? between "]")
|
||||
(string/includes? between "(")
|
||||
(string/includes? between ")")))
|
||||
(state/clear-editor-action!)))))
|
||||
(contains? #{:page-search :page-search-hashtag :block-search} (state/get-editor-action))
|
||||
(not (wrapped-by? input page-ref/left-brackets page-ref/right-brackets))
|
||||
(not (wrapped-by? input block-ref/left-parens block-ref/right-parens))
|
||||
(not (wrapped-by? input "#" "")))
|
||||
(state/clear-editor-action!)))
|
||||
|
||||
(defn resize-image!
|
||||
[block-id metadata full_text size]
|
||||
|
||||
Reference in New Issue
Block a user