Re: [ime-api] Composition dictionary should be changed [Bug 22059] (#4)

Comment 3 <https://www.w3.org/Bugs/Public/show_bug.cgi?id=22059#c3> @TakayoshiKochi 

Takayoshi Kochi 2013-10-02 01:42:00 EDT

Sorry for my belated response.

(In reply to Travis Leithead [MSFT] from comment #2)
> (In reply to comment #1)
> >     readonly    attribute long        selectionStart;
> >     readonly    attribute long        selectionEnd;
> 
> Selection & composition are two completely different underlying concepts
> that shouldn’t be combined. I think calling these "selection.." is confusing
> with normal text selection. The currently selected text will already be
> available via the input and textarea's selection properties--no need to
> duplicate the functionality. Offset (in the MS proposal) makes it clear that
> it’s character positions and not DOM nodes. These offset character positions
> mark the actual "active" composition range (which may be different from what
> is currently selected). Maybe for brevity: "startOffset"/ "endOffset"? or
> "textContentStart"/"textContentEnd"?

I agree this is a fair argument.

I don't have strong preference of any of these,
 1 startOffset / endOffset
 2 textContentStart / textContentEnd
 3 activeSegmentStart / activeSegmentEnd
 4 activeSegmentStartOffset / activeSegmentEndOffset
 5 etc. etc.

but 1 is too simple and maybe confusing, 2 may be also confusing against
DOM node's textContent.  How about 3?

> >     readonly    attribute Uint32Array segments;
> 
> OK. This is not relevant to all IMEs though. I suppose we could implement
> this for other IMEs by always returning only 1 segment.

(FYI now it's spec'ed as "sequence<unsigned long> getSegments();"
https://dvcs.w3.org/hg/ime-api/raw-file/default/Overview.html#widl-Composition-getSegments-sequence-unsigned-long )


For non-segmenting IMEs (most non-Japanese IMEs) return just one '0' element.
 
> > where selectionStart/End means identical to that for <input>/<textarea>,
> > and added segments information for dividing the text into clauses.
> 
> No need for the redundancy. What we found is that we actually needed the
> "active" composition offsets, not the selected text which varies depending
> on the state of the IME. See above.

See above, too ;)

---
Reply to this email directly or view it on GitHub:
https://github.com/w3c/ime-api/issues/4#issuecomment-147406049

Received on Monday, 12 October 2015 13:54:52 UTC