Browse Source

fix: hard to reverse right swipe

llcc 3 years ago
parent
commit
c1822f3ed1
1 changed files with 2 additions and 1 deletions
  1. 2 1
      src/main/frontend/handler/block.cljs

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

@@ -172,7 +172,8 @@
   (when-let [touches (.-targetTouches event)]
     (let [selection-type (.-type (.getSelection js/document))]
       (when-not (= selection-type "Range")
-        (when (< (- (js/Date.now) @*touch-start) 600)
+        (when (or (not (state/sub :editor/editing?))
+                  (< (- (js/Date.now) @*touch-start) 600))
           (when (and (= (.-length touches) 1) @*swipe)
             (let [{:keys [x0 xi direction]} @*swipe
                   touch (aget touches 0)