fix: disable auto-save when the editor is in composition

This commit is contained in:
Tienson Qin
2021-02-09 14:31:30 +08:00
parent 1c75042f5b
commit a7cb97c3f2
3 changed files with 17 additions and 6 deletions

View File

@@ -1437,7 +1437,9 @@
(save-current-block-when-idle! {}))
([{:keys [check-idle? chan chan-callback]
:or {check-idle? true}}]
(when (nil? (state/get-editor-op))
(when (and (nil? (state/get-editor-op))
;; non English input method
(not (state/editor-in-composition?)))
(when-let [repo (state/get-current-repo)]
(when (and (if check-idle? (state/input-idle? repo) true)
(not (state/get-editor-show-page-search?))