fix: input-selection-end is not firing correctly

Fixes #10106
This commit is contained in:
Allan Chain
2023-08-28 15:08:03 +08:00
committed by Tienson Qin
parent 5e1117ef92
commit 474360ff1e

View File

@@ -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)