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

Comments 4 through 16

= Comment 16 Takayoshi Kochi 2014-04-08 01:22:20 EDT

Reopening this.

= Comment 15 Takayoshi Kochi 2014-01-27 00:24:27 EST

Okay, thanks for the comment.
I'll work on updating the spec accordingly.

= Comment 14 Jianfeng Lin 2014-01-21 20:15:52 EST

We use offset because the key scenario we were trying to tackle is the search suggestion in <input type="text">, in which case it has to be an offset within the element's textContent. For contentEditable a range object could be more useful and the API could support both offset and range there.

= Comment 13 Takayoshi Kochi 2013-12-13 03:06:08 EST

I would like to make clarification - The original proposal[1] says:
> on an element with the contentEditable flag set, then this is the
> starting offset relative to the target's textContent property
> (textContent is a linear view of all the text under an element)

But the current MSDN document[2] (as of today, Dec. 13, 2013) doesn't
mention about behavior when compositionStartOffset/End used in
contenteditable.

The way that a browser generates textContent from DOM tree and
that a browser holds where an IME composition are not usually compatible -
is there really a use case to get offsets within contenteditable?

I personally suppose for contenteditable it is reasonable to return
Range's before and after IME composition within contenteditable
(to different attributes, of course) - but am not sure yet.

What do you think?

[1] https://dvcs.w3.org/hg/ime-api/raw-file/tip/proposals/IMEProposal.html#widl-InputMethodContext-compositionStartOffset
[2] http://msdn.microsoft.com/en-us/library/ie/dn433247(v=vs.85).aspx

= Comment 12 Jianfeng Lin 2013-12-02 21:40:10 EST

Closing the bug as we agree with having composition{Start,End}Offset directly under InputMethodContext interface and moving active segment to a separate document.

= Comment 11 Takayoshi Kochi 2013-12-02 21:09:17 EST

The document has been moved:
https://dvcs.w3.org/hg/ime-api/raw-file/default/Annex.html

See example 2.

= Comment 10 Takayoshi Kochi 2013-11-07 04:49:41 EST

(In reply to Takayoshi Kochi from comment #9)
> For active segments, it will be used for rendering composition by webapps,
> not browsers.

See example 2 of the spec.
https://dvcs.w3.org/hg/ime-api/raw-file/default/Overview.html

= Comment 9 Takayoshi Kochi 2013-11-06 22:38:51 EST

It is because composition{Start,End}Offset are relative to its parent's
"value" and external to the composition itself.

For active segments, it will be used for rendering composition by webapps,
not browsers.

= Comment 8 Jianfeng Lin 2013-11-06 20:03:53 EST

Thanks for accepting the proposal, Takayoshi. I saw that you put it right under InputMethodContext interface. Why not under the "composition" attribute of that interface? Since this is information about the composition, it makes more sense to be inside the composition attribute, and there you could simplify the name to be "startOffset/endOffset", so developers can reference them by element.inputMethodContext.composition.startOffset.

I'm still curious about the use cases for active segments.

= Comment 7 Takayoshi Kochi 2013-11-05 23:52:29 EST

As composition{Start,End}Offset added in the spec, closing this.

For hasComposition()/compositionText, see
https://www.w3.org/Bugs/Public/show_bug.cgi?id=22028

= Comment 6 Takayoshi Kochi 2013-11-05 23:29:42 EST

Thanks Jianfeng for clarification.

Added compositionStartOffset/compositionEndOffset.
https://dvcs.w3.org/hg/ime-api/raw-file/8c061ee19f99/Overview.html#widl-InputMethodContext-compositionStartOffset

= Comment 5 Jianfeng Lin 2013-10-21 21:31:17 EDT

Takayoshi, the compositionStartOffset / compositionEndOffset we proposed is different from activeSegmentStartOffset / activeSegmentEndOffset you suggested, so please don't replace them. For example when the user types "honnwoyomu" in Japanese IME and hits space, the whole sentence will be in composition while only the first part "本を" will be the active segment you mentioned. So the text in between compositionStartOffset and compositionEndOffset should be "本を読む" while the text in between activeSegmentStartOffset and activeSegmentEndOffset should be "本を". We are not against exposing the information about where the active segment is, but exposing the position of the composition is more important.

= Comment 4 Takayoshi Kochi 2013-10-10 04:11:13 EDT

changed to activeSegmentStart/End
https://dvcs.w3.org/hg/ime-api/rev/10a3d6ec9336



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

Received on Monday, 12 October 2015 13:57:58 UTC