- From: Johannes Wilm <notifications@github.com>
- Date: Mon, 17 Nov 2025 18:03:20 -0800
- To: w3c/editing <editing@noreply.github.com>
- Cc: Subscribed <subscribed@noreply.github.com>
Received on Tuesday, 18 November 2025 02:03:24 UTC
johanneswilm left a comment (w3c/editing#511) The point of `getTargetRanges()` is to get the ranges that an event covers over - which may not always be the same as the selection. It was first introduced for input events as a new way to get static ranges in a way that is more memory efficient than dynamic selection objects. `beforeinput` and `compositionstart` are two different types of events and the meaning of their target ranges would therefore be somewhat different, but I don't see why it would be wrong to also expose target ranges for `compositionstart` even if its meaning is different. The question then is if in the case of `compositionstart`, the target ranges are always exactly the same as the selection. If one can be sure that they are always the exact same thing, then there is arguably not a need for another method to additionally also get the target ranges. @michael In the video example above, what is the selection at the time of `compositionstart`? -- Reply to this email directly or view it on GitHub: https://github.com/w3c/editing/issues/511#issuecomment-3544696118 You are receiving this because you are subscribed to this thread. Message ID: <w3c/editing/issues/511/3544696118@github.com>
Received on Tuesday, 18 November 2025 02:03:24 UTC