Re: [UIEvents] Keydown/keyup events during composition

On 2016/01/12 14:02, Ryosuke Niwa wrote:
>
>> On Jan 11, 2016, at 8:26 PM, Masayuki Nakano <masayuki@d-toybox.com> wrote:
>>
>> As far as I know, Gecko doesn't dispatch keydown nor keyup event for IME unaware applications because JS changes something at keydown or keyup event handler causes forcibly committing composition that may have caused IME unavailable on such web pages.
>
> I see. So not dispatching keydown/keyup during a composition was a mitigation strategy for this problem?

Exactly. But for now, non-Gecko browsers dispatch them, so, this reason 
doesn't make sense, of course. I just talked about the original reason.

>> At a meeting of UI Events (or D3E Events), we discussed this issue. IIRC, at that time, we didn't find any proper value but browsers should *not* dispatch keyboard events during composition (but allowing it for backward compatibility for non-Gecko browsers, therefore, currently defined with MAY).
>
> I don't think having such a big difference in IME behavior is desirable.  We should somehow find a way to interoperate in this regard.
>
> Given the compatibility risk of not firing key up/down in all non-Gecko browsers is quite high, firing it in Gecko seemed like the best way forward.  Having said that, I do see your rationale for not firing key up/down during composition.

Yeah, I agree. The bug is here:
https://bugzilla.mozilla.org/show_bug.cgi?id=354358

I'm currently working on making keyboard event and composition event 
dispatcher move from platform specific code to cross platform code. 
After fixing it (perhaps, this spring?), we can change our behavior easily.

-- 
Masayuki Nakano <masayuki@d-toybox.com>
Manager, Internationalization, Mozilla Japan.

Received on Tuesday, 12 January 2016 05:12:39 UTC