mirror of
https://github.com/logseq/logseq.git
synced 2026-04-29 00:24:51 +00:00
fix: alias delete not working
This commit is contained in:
@@ -302,21 +302,21 @@
|
||||
[:input.form-input.block.w-full.pl-2.sm:text-sm.sm:leading-5
|
||||
(merge
|
||||
(cond->
|
||||
{:key (str "modal-input-" (name id))
|
||||
:id (str "modal-input-" (name id))
|
||||
:type (or type "text")
|
||||
:on-change (fn [e]
|
||||
(swap! input-value assoc id (util/evalue e)))
|
||||
:auto-complete (if (util/chrome?) "chrome-off" "off")}
|
||||
{:key (str "modal-input-" (name id))
|
||||
:id (str "modal-input-" (name id))
|
||||
:type (or type "text")
|
||||
:on-change (fn [e]
|
||||
(swap! input-value assoc id (util/evalue e)))
|
||||
:auto-complete (if (util/chrome?) "chrome-off" "off")}
|
||||
placeholder
|
||||
(assoc :placeholder placeholder))
|
||||
(dissoc input-item :id))]])
|
||||
(ui/button
|
||||
"Submit"
|
||||
:on-click
|
||||
(fn [e]
|
||||
(util/stop e)
|
||||
(on-submit command @input-value pos)))])))))
|
||||
"Submit"
|
||||
:on-click
|
||||
(fn [e]
|
||||
(util/stop e)
|
||||
(on-submit command @input-value pos)))])))))
|
||||
|
||||
(rum/defc absolute-modal < rum/static
|
||||
[cp set-default-width? {:keys [top left]}]
|
||||
@@ -638,17 +638,17 @@
|
||||
(let [target (.-target e)]
|
||||
(when-not (d/has-class? target "bottom-action")
|
||||
(let [{:keys [on-hide format value block id repo dummy?]} (get-state state)]
|
||||
(when on-hide
|
||||
(on-hide value event))
|
||||
(when
|
||||
(or (= event :esc)
|
||||
(= event :visibilitychange)
|
||||
(and (= event :click)
|
||||
(not (editor-handler/in-auto-complete? (gdom/getElement id)))))
|
||||
(state/clear-edit!))))))
|
||||
(when on-hide
|
||||
(on-hide value event))
|
||||
(when
|
||||
(or (= event :esc)
|
||||
(= event :visibilitychange)
|
||||
(and (= event :click)
|
||||
(not (editor-handler/in-auto-complete? (gdom/getElement id)))))
|
||||
(state/clear-edit!))))))
|
||||
:node (gdom/getElement id)
|
||||
;; :visibilitychange? true
|
||||
))
|
||||
))
|
||||
100)
|
||||
|
||||
(when-let [element (gdom/getElement id)]
|
||||
|
||||
Reference in New Issue
Block a user