I would like a callback function to be executed each time the caret or selection moves in the text area.
Anybody knows how to do that?
Edit: I know how to retrieve the carret position. I’m interested in how to watch for the change. With my current knowledge i would test carret position on each keyup / mousemouve / mouseup. Is there a smarter (and more performant) way to do it. Are there event that may change the carret position that i did not think about ?
In the end I finally found after exploring each of possible solutions that there is no performant way to do that for large amounts of text.
I have no other solution than waiting for my web application to meet the technical requirements to use a modern text area replacement library (= not depending of ie quirks mode).