mirror of
https://github.com/logseq/logseq.git
synced 2026-05-26 05:34:07 +00:00
fix: don't submit comment when composing
This commit is contained in:
@@ -1,6 +1,7 @@
|
||||
(ns frontend.components.block.comments-model
|
||||
(:require [clojure.string :as string]
|
||||
[frontend.context.i18n :refer [t]]
|
||||
[frontend.util :as util]
|
||||
[goog.object :as gobj]))
|
||||
|
||||
(def comments-tag-ident :logseq.class/Comments)
|
||||
@@ -333,4 +334,5 @@
|
||||
(boolean
|
||||
(and (nil? editor-action)
|
||||
(= "Enter" (gobj/get event "key"))
|
||||
(not (util/native-event-is-composing? event))
|
||||
(not (true? (gobj/get event "shiftKey")))))))
|
||||
|
||||
@@ -1167,7 +1167,9 @@
|
||||
(.-nativeEvent e)
|
||||
|
||||
:else e))]
|
||||
(.-isComposing native-event))))
|
||||
(or (.-isComposing native-event)
|
||||
(= (gobj/get native-event "keyCode") 229)
|
||||
(= (gobj/get native-event "key") "Process")))))
|
||||
|
||||
#?(:cljs
|
||||
(defn open-url
|
||||
|
||||
Reference in New Issue
Block a user