Browse Source

fix: blocks command bar blink when editing another block

Tienson Qin 7 months ago
parent
commit
71816b042f

+ 2 - 1
src/main/capacitor/components/app.cljs

@@ -87,7 +87,8 @@
   []
   [:input.absolute.top-4.left-0.w-1.h-1.opacity-0
    {:id "app-keep-keyboard-open-input"
-    :auto-capitalize "off"}])
+    :auto-capitalize "off"
+    :auto-correct "false"}])
 
 (rum/defc journals
   []

+ 3 - 1
src/main/frontend/mobile/mobile_bar.cljs

@@ -101,7 +101,9 @@
 
 (rum/defc mobile-bar < rum/reactive
   []
-  (when (and (util/mobile?) (state/sub :editor/editing?))
+  (when (and (util/mobile?)
+             (or (state/sub :editor/editing?)
+                 (= "app-keep-keyboard-open-input" (some-> js/document.activeElement (.-id)))))
     (let [commands' (commands)]
       [:div#mobile-editor-toolbar
        [:div.toolbar-commands