Hi all,

I'm implementing b2g keyboard/IME api and encounter a problem
with the selection range observing.

We want to monitor the cursor position or selection range changes
in current input element, which is a text input field or a content
editable element receiving user's input. The cursor position or the
selection range can be changed by
1) key events generated by virtual keyboard,
2) js code,
3) mouse events triggered by user.

Currently we listen a pile of events(mousedown, mouseup, input...)
to check if the selection range has been changed. It is inefficient
and error prone.

I wonder if there is a way to monitor the selection range changes
from chrome js.

Could anyone give me a clue?

Thanks.
_______________________________________________
dev-platform mailing list
dev-platform@lists.mozilla.org
https://lists.mozilla.org/listinfo/dev-platform

Reply via email to