From 474360ff1ec16bc3f74f99dc6edeaeae7e0c11ba Mon Sep 17 00:00:00 2001 From: Allan Chain <36528777+AllanChain@users.noreply.github.com> Date: Mon, 28 Aug 2023 15:08:03 +0800 Subject: [PATCH] fix: input-selection-end is not firing correctly Fixes #10106 --- src/main/frontend/ui.cljs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/main/frontend/ui.cljs b/src/main/frontend/ui.cljs index e87604e227..8b27f290d7 100644 --- a/src/main/frontend/ui.cljs +++ b/src/main/frontend/ui.cljs @@ -89,7 +89,7 @@ (let [^js el (rum/dom-node state)] ;; Passing aria-label as a prop to TextareaAutosize removes the dash (.setAttribute el "aria-label" "editing block") - (. el addEventListener "mouseup" + (. el addEventListener "select" #(let [start (util/get-selection-start el) end (util/get-selection-end el)] (when (and start end)