mirror of https://github.com/logseq/logseq
fix: failed to insert [, {, ( on new created page
parent
fd8736d34f
commit
3b353ac515
|
@ -340,11 +340,11 @@
|
|||
*slash-caret-pos)))])
|
||||
|
||||
(defn- set-up-key-down!
|
||||
[repo state input input-id format]
|
||||
[repo state format]
|
||||
(mixins/on-key-down
|
||||
state
|
||||
{}
|
||||
{:not-matched-handler (editor-handler/keydown-not-matched-handler input input-id format)}))
|
||||
{:not-matched-handler (editor-handler/keydown-not-matched-handler format)}))
|
||||
|
||||
(defn- set-up-key-up!
|
||||
[state input input-id search-timeout]
|
||||
|
@ -361,7 +361,7 @@
|
|||
input-id id
|
||||
input (gdom/getElement input-id)
|
||||
repo (:block/repo block)]
|
||||
(set-up-key-down! repo state input input-id format)
|
||||
(set-up-key-down! repo state format)
|
||||
(set-up-key-up! state input input-id search-timeout)))
|
||||
|
||||
(rum/defcs box < rum/reactive
|
||||
|
|
|
@ -2154,9 +2154,11 @@
|
|||
(util/move-cursor-to input pos))))))))
|
||||
|
||||
(defn keydown-not-matched-handler
|
||||
[input input-id format]
|
||||
[format]
|
||||
(fn [e key-code]
|
||||
(let [key (gobj/get e "key")
|
||||
(let [input-id (state/get-edit-input-id)
|
||||
input (state/get-input)
|
||||
key (gobj/get e "key")
|
||||
value (gobj/get input "value")
|
||||
ctrlKey (gobj/get e "ctrlKey")
|
||||
metaKey (gobj/get e "metaKey")
|
||||
|
|
Loading…
Reference in New Issue