Re: [w3c/editing] Expose event.getTargetRanges() in oncompositionstart (and possibly oncompositionend as well) (Issue #511)

masayuki-nakano left a comment (w3c/editing#511)

The event source of composition events are IME and DOM Selection. On the other hand, the event source of `beforeinput` event is the builtin editor and its managing DOM tree and DOM Selection. Therefore, I don't think it's reasonable to add `getTargetRanges` to composition events.

On the other hand, if IME wants to replace existing text, I think browsers should select the range with DOM Selection before `compositionstart`. I think Firefox does it. The other browsers do not do that? If they do it, DOM Selection range which you can check from a `compositionstart` is what you want.

-- 
Reply to this email directly or view it on GitHub:
https://github.com/w3c/editing/issues/511#issuecomment-3544653705
You are receiving this because you are subscribed to this thread.

Message ID: <w3c/editing/issues/511/3544653705@github.com>

Received on Tuesday, 18 November 2025 01:37:23 UTC