Re: Composition Events in DOM3 Events

On 8/20/09 12:23 PM, Doug Schepers wrote:
> Hi, Bono-san-
>
> Thanks for your excellent write-up. I've now integrated Composition
> Events into the DOM3 Events spec. The relevant parts of the spec that
> were changed are ready for review [1][2][3][4], but are not yet complete.
>
> I made some modifications and came up with a few questions while editing
> the material, which I hope you, Dan, or someone else might enlighten me on:
>
>
> 1) spelling of events:
> In different places, you use all lowercase, or camelCase for
> compositionStart/compositionstart, compositionUpdate/compositionupdate,
> and compositionEnd/compositionend. The camelCase is more consistent with
> 'textInput', but more unwieldy to type and unlike other event types like
> 'mousedown', 'keyup', etc. Which should it be? Will this affect existing
> implementations?

Gecko has compositionstart/compositionend

>
> 3) order of events:
> In your proposal, the examples showed 'compositionEnd' events following
> 'textInput' events. It seemed to me that the order should be reversed...
> that the end of the composition mode (after the IME dialog closes, etc.)
> would "trigger" the 'textInput' event. This is how I represented it in
> DOM3 Events. Does this violate existing implementations? Is there some
> rationale I'm missing to have the order as you proposed?

textInput should be after compositionend.

>
>
> 4) canceling a composition:
> In your examples, you include an example of an IME operation being
> canceled. Should we add a 'compositionCancel' event, or a
> 'cancelCompositionEvent' method to account for this?
Or is it just enough if compositionend.data is null (in which case 
textInput doesn't fire).


>
> 5) event flow:
> Since Composition Events are, in some sense, happening outside the
> normal document (in that the UA or OS provides the composition context,
> how should these operate in the event flow? Should these events bubble
> or be cancelable?
I see no reason why they shouldn't bubble.
But cancelable... what would it mean for them to be cancelable?
Maybe cancelling compositionend should prevent textInput to fire.
Cancelling compositionstart could prevent IME input? (Have to check if 
that is easily implementable in common OSes)


-Olli

Received on Wednesday, 26 August 2009 20:30:56 UTC