Просмотр исходного кода

fix: wrongly input TAB to editor

Tienson Qin 1 год назад
Родитель
Сommit
6b245551a0

+ 1 - 1
src/main/frontend/db.cljs

@@ -46,7 +46,7 @@
   get-current-page
   remove-q! remove-query-component! add-q! add-query-component! clear-query-state!
   q
-  query-state query-components remove-custom-query! set-new-result!])
+  query-state query-components set-new-result!])
 
 (defn start-db-conn!
   ([repo]

+ 0 - 5
src/main/frontend/db/react.cljs

@@ -68,11 +68,6 @@
             (remove-q! query))))))
   (swap! query-components dissoc component))
 
-;; TODO: rename :custom to :query/custom
-(defn remove-custom-query!
-  [repo query]
-  (remove-q! [repo :custom query]))
-
 ;; Reactive query
 
 (defn get-query-cached-result

+ 3 - 2
src/main/frontend/handler/editor.cljs

@@ -2870,9 +2870,10 @@
         ;; stop accepting edits if the new block is not created yet
         (some? @(:editor/async-unsaved-chars @state/state))
         (do
-          (when (not= key "Enter")
+          (when (= 1 (count (str key)))
             (state/update-state! :editor/async-unsaved-chars
-                                 (fn [s] (str s key))))
+                                 (fn [s]
+                                   (str s key))))
           (util/stop e))
 
         (and (contains? #{"ArrowLeft" "ArrowRight"} key)