fix: unable to type with IME in search modal

This commit is contained in:
Junyi Du
2021-12-15 05:57:54 +08:00
committed by Tienson Qin
parent 0dcc79e4ab
commit 7238709d32
2 changed files with 4 additions and 4 deletions

View File

@@ -15,7 +15,7 @@
[frontend.config :as config]
[frontend.search :as search]
[clojure.string :as string]
[goog.dom :as gdom]
[goog.object :as gobj]
[medley.core :as medley]
[frontend.context.i18n :as i18n]
[frontend.date :as date]
@@ -387,8 +387,9 @@
:on-change (fn [e]
(when @search-timeout
(js/clearTimeout @search-timeout))
(let [value (util/evalue e)]
(if (string/blank? value)
(let [value (util/evalue e)
is-composing? (gobj/getValueByKeys e "nativeEvent" "isComposing")]
(if (and (string/blank? value) (not is-composing?))
(search-handler/clear-search! false)
(let [search-mode (state/get-search-mode)
opts (if (= :page search-mode)