Browse Source

don't enter editing state when click query table result on iOS

llcc 3 years ago
parent
commit
808215dda8

+ 2 - 1
src/main/frontend/components/block.cljs

@@ -1929,7 +1929,8 @@
    (and (util/sup? target)
         (dom/has-class? target "fn"))
    (dom/has-class? target "image-resize")
-   (dom/closest target "a")))
+   (dom/closest target "a")
+   (dom/closest target ".query-table")))
 
 (defn- block-content-on-mouse-down
   [e block block-id _content edit-input-id]

+ 2 - 1
src/main/frontend/components/query_table.cljs

@@ -112,7 +112,8 @@
                                  desc?
                                  result)]
       [:div.overflow-x-auto {:on-mouse-down (fn [e] (.stopPropagation e))
-                             :style {:width "100%"}}
+                             :style {:width "100%"}
+                             :class (when-not page? "query-table")}
        [:table.table-auto
         [:thead
          [:tr.cursor