[UIEvents] Firing composition events for dead keys

2016-01-09 Thread Ryosuke Niwa
Hi all,

This is another feedback from multiple browser vendors (Apple, Google, 
Microsoft) that got together in Redmond last Thursday to discuss editing API 
and related events.


We found out that all major browsers (Chrome, Firefox, and Safari) fire 
composition events for dead keys on Mac but they don't on Windows.  I think 
this difference comes from the underlying platform's difference but we think we 
should standardize it to always fire composition events for consistent behavior 
across platforms.

Does anyone know of any implementation limitation to do this?  Or are there any 
reason we should not fire composition events for dead keys on Windows?

- R. Niwa




Re: [UIEvents] Firing composition events for dead keys

2016-01-09 Thread Olli Pettay

On 01/10/2016 01:14 AM, Ryosuke Niwa wrote:

Hi all,

This is another feedback from multiple browser vendors (Apple, Google, 
Microsoft) that got together in Redmond last Thursday to discuss editing API 
and related events.


We found out that all major browsers (Chrome, Firefox, and Safari) fire 
composition events for dead keys on Mac but they don't on Windows.  I think 
this difference comes from the underlying platform's difference but we think we 
should standardize it to always fire composition events for consistent behavior 
across platforms.

Does anyone know of any implementation limitation to do this?  Or are there any 
reason we should not fire composition events for dead keys on Windows?

- R. Niwa




Does anyone know the behavior on Linux.

What is the exact case you're talking about here? do you have a testcase?


-Olli



Re: [UIEvents] Firing composition events for dead keys

2016-01-09 Thread Ryosuke Niwa

> On Jan 9, 2016, at 6:33 PM, Olli Pettay  wrote:
> 
> On 01/10/2016 01:14 AM, Ryosuke Niwa wrote:
>> Hi all,
>> 
>> This is another feedback from multiple browser vendors (Apple, Google, 
>> Microsoft) that got together in Redmond last Thursday to discuss editing API 
>> and related events.
>> 
>> 
>> We found out that all major browsers (Chrome, Firefox, and Safari) fire 
>> composition events for dead keys on Mac but they don't on Windows.  I think 
>> this difference comes from the underlying platform's difference but we think 
>> we should standardize it to always fire composition events for consistent 
>> behavior across platforms.
>> 
>> Does anyone know of any implementation limitation to do this?  Or are there 
>> any reason we should not fire composition events for dead keys on Windows?
>> 
> 
> Does anyone know the behavior on Linux.
> 
> What is the exact case you're talking about here? do you have a test case?

Sure. On Mac, you can enable International English keyboard and type ' key and 
then u.

On Mac:
1. Pressing ' key inserts ' (character) and fires `compositionstart` event.
2. Pressing u key replaces ' with ú and fires `compositionend`.


On Windows, dead key doesn't insert any character at all, and pressing the 
second key insert the composed character.

Looking at MSDN:
https://msdn.microsoft.com/en-us/library/windows/desktop/ms646267(v=vs.85).aspx#_win32_Dead_Character_Messages

dead key should issue WM_KEYDOWN as well as WM_DEADCHAR in TranslateMessage so 
I don't think there is an inherent platform limitation to fire composition 
events.

- R. Niwa




Re: [UIEvents] Firing composition events for dead keys

2016-01-09 Thread Olli Pettay

On 01/10/2016 05:05 AM, Ryosuke Niwa wrote:



On Jan 9, 2016, at 6:33 PM, Olli Pettay  wrote:

On 01/10/2016 01:14 AM, Ryosuke Niwa wrote:

Hi all,

This is another feedback from multiple browser vendors (Apple, Google, 
Microsoft) that got together in Redmond last Thursday to discuss editing API 
and related events.


We found out that all major browsers (Chrome, Firefox, and Safari) fire 
composition events for dead keys on Mac but they don't on Windows.  I think 
this difference comes from the underlying platform's difference but we think we 
should standardize it to always fire composition events for consistent behavior 
across platforms.

Does anyone know of any implementation limitation to do this?  Or are there any 
reason we should not fire composition events for dead keys on Windows?



Does anyone know the behavior on Linux.

What is the exact case you're talking about here? do you have a test case?


Sure. On Mac, you can enable International English keyboard and type ' key and 
then u.

On Mac:
1. Pressing ' key inserts ' (character) and fires `compositionstart` event.
2. Pressing u key replaces ' with ú and fires `compositionend`.


On Windows, dead key doesn't insert any character at all, and pressing the 
second key insert the composed character.

Looking at MSDN:
https://msdn.microsoft.com/en-us/library/windows/desktop/ms646267(v=vs.85).aspx#_win32_Dead_Character_Messages

dead key should issue WM_KEYDOWN as well as WM_DEADCHAR in TranslateMessage so 
I don't think there is an inherent platform limitation to fire composition 
events.

- R. Niwa




On linux pressing ` once doesn't insert any character nor dispatch composition 
events
Then pressing u after that gives composition events in Firefox Nightly and ù is 
inserted.
Chrome(49) doesn't seem to dispatch any composition events in this case on 
linux, although ù is also inserted.