瀏覽代碼

fix: input-selection-end is not firing correctly

Fixes #10106
Allan Chain 2 年之前
父節點
當前提交
474360ff1e
共有 1 個文件被更改,包括 1 次插入1 次删除
  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)