mirror of
https://github.com/logseq/logseq.git
synced 2026-05-03 18:36:43 +00:00
fix app crash if swiped block and editing block are different
This commit is contained in:
@@ -1,6 +1,7 @@
|
||||
(ns frontend.handler.block
|
||||
(:require
|
||||
[clojure.set :as set]
|
||||
[clojure.string :as string]
|
||||
[clojure.walk :as walk]
|
||||
[frontend.db :as db]
|
||||
[frontend.db.model :as db-model]
|
||||
@@ -149,8 +150,12 @@
|
||||
(def *swipe (atom nil))
|
||||
|
||||
(defn on-touch-start
|
||||
[event]
|
||||
(let [input (state/get-input)]
|
||||
[event uuid]
|
||||
(let [input (state/get-input)
|
||||
input-id (state/get-edit-input-id)]
|
||||
(when-not (and input
|
||||
(string/ends-with? input-id (str uuid)))
|
||||
(state/clear-edit!))
|
||||
(when (= (util/get-selection-start input)
|
||||
(util/get-selection-end input))
|
||||
(when-let [touches (.-targetTouches event)]
|
||||
|
||||
Reference in New Issue
Block a user