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

It seems we are going back and forth here. Let me summarize the current situation based on my work and all the evidence currently available:

 - I.E., Safari, and Edge (Non-chromium-based) have the expected, spec-defined behavior.
 - Chromium-based browsers and Firefox do not have the expected, spec-defined behavior.
   - These browsers implement direct translation of OS events to key events.
     - On Windows, this implies two events are sent for a surrogate pair.
     - On macOS, this implies one (chromium is currently broken w.r.t. macOS surrogate pairs)
       - Fix is ongoing: https://chromium-review.googlesource.com/c/chromium/src/+/4561928
 
This implies Chromium-based browsers and Firefox need an intermediate layer that joins the surrogate pairs to emit a proper keyboard sequence.

@Pauan @drwez There are two perspectives here. One can blame Windows for dispatching two events or one can blame the bad browsers for not handling two events on Windows. Since it's not reasonable to expect Windows to change behavior (obviously), we can attribute the blame to the browsers.

For everyone in this issue, let's try to conclude with a solution:

I believe the spec is well-defined, in that surrogate pairs must be fully concatenated before emitting an event. Although this is not specifically stated, it's a given consider past behavior in Edge and I.E. + current behavior in Safari. WDYT?

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

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

Received on Thursday, 1 June 2023 17:11:20 UTC