Re: [w3c/uievents] Clarify `keypress` event handling for keys that map to non-BMP Unicode symbols (Issue #346)

Ah, OK. `input` is a distinct event from the `keypress` event that this issue discusses; I mentioned it in comparison to the (legacy) `keypress` event, since it suffers similarly from reflecting the underlying platform behaviour too closely, at present.

As you point out, though, the current behaviour of Chrome (and presumably Edge) for Unicode code-points that require surrogate pairs to express in UTF-16 is incorrect with respect to the `InputEvent.data` wording in the current UI Events spec.  The Windows platform conveys non-BMP characters via a pair of `WM_CHAR` events, each holding one of the UTF-16 surrogate pair code-units, and Chromium is presumably just routing those directly to `input` events, whereas the old Edge engine (and others) are doing some additional processing to only surface complete code-points.  I've filed a bug against Chromium for that (crbug.com/1450498) for that.


-- 
Reply to this email directly or view it on GitHub:
https://github.com/w3c/uievents/issues/346#issuecomment-1571685548
You are receiving this because you are subscribed to this thread.

Message ID: <w3c/uievents/issues/346/1571685548@github.com>

Received on Thursday, 1 June 2023 09:30:25 UTC