Pārlūkot izejas kodu

Merge branch 'feat/db' into perf/app-start

Tienson Qin 6 mēneši atpakaļ
vecāks
revīzija
bdde2c7526

+ 5 - 4
deps/shui/src/logseq/shui/base/core.cljs

@@ -43,10 +43,11 @@
         children (if (map? props) children (cons props children))
         props (assoc (if (map? props) props {})
                      :on-key-up (fn [^js e]
-                             ;; TODO: return value
-                                  (when (fn? on-key-up') (on-key-up' e))
-                                  (when (= "Enter" (.-key e))
-                                    (some-> (.-target e) (.click)))))]
+                                  ;; If on-key-up is provided, it should be able to control Enter behavior
+                                  (if (fn? on-key-up')
+                                    (on-key-up' e)
+                                    (when (= "Enter" (.-key e))
+                                      (some-> (.-target e) (.click))))))]
     (apply button-base props children)))
 
 (defn button-icon

+ 1 - 1
src/main/frontend/components/page.css

@@ -262,5 +262,5 @@ html.is-native-ios {
 }
 
 .ls-page-blocks {
-  @apply min-h-[60px];
+  @apply min-h-[60px] overflow-hidden;
 }

+ 1 - 0
src/main/frontend/components/property/config.cljs

@@ -234,6 +234,7 @@
       (let [dirty? (not= (rum/deref *form-data) form-data)]
         (shui/button {:size "sm"
                       :disabled (not dirty?)
+                      :on-key-up util/stop
                       :on-click (fn []
                                   (-> (<upsert-closed-value! own-property
                                                              (cond-> form-data uuid (assoc :id uuid)))