Browse Source

fix: input-selection-end is not firing correctly

Fixes #10106
Allan Chain 2 years ago
parent
commit
474360ff1e
1 changed files with 1 additions and 1 deletions
  1. 1 1
      src/main/frontend/ui.cljs

+ 1 - 1
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)