- From: Pierre Ossman (Work account) <notifications@github.com>
- Date: Wed, 28 Jun 2023 03:45:59 -0700
- To: w3c/uievents <uievents@noreply.github.com>
- Cc: Subscribed <subscribed@noreply.github.com>
- Message-ID: <w3c/uievents/issues/343/1611179036@github.com>
> > The `data` attribute of the `compositionupdate` event should indicate the dead key. As shown in this example: https://www.w3.org/TR/uievents/#example-a785f64b > Thank you for the reference. Unfortunately, the browsers don't seem to follow that example. Is the behaviour more explicitly defined somewhere? All three major engines send `U+00A8` in the `data` field instead of the appropriate `U+0308`. And this is on Linux, where detecting dead characters is trivial. I assume it's even worse on Windows and macOS. And even if the browsers did it correctly, I'm afraid it looks like it would fall apart if more than one dead key is used after each other, as `data` shows the current state and not the last pressed key. The behaviour of `key` for the `keydown` and `keyup` events also varies. The example states that it should be the composited symbol. Is this clearly specified anywhere except this example? Because we really don't want that for our use case. We want the symbol only affected by modifiers, nothing else. So we'd need an alternative to `key` if the browsers started implementing this bit correctly. For Firefox, it varies, and it sometimes sends the uncomposited symbols, and sometimes the composited. Chrome either sends the uncomposited symbol, or the special `"Process"` value, which I doubt is correct. WebKit sends either sends the uncomposited symbol, or `"Unidentified"`. > > You should be able to get these events if you give the canvas a `tabindex` attribute. > Unfortunately not. I'm guessing the browsers equate composition with IME, and a full-blown IME will not work properly with a non-text element. So they likely disable the entire thing. The composition events are also unreliable, even for a text element. On Linux, which composition events I get depends on the desktop environment I have. GNOME gives me all of them, Xfce gives me some, and MATE gives me none. Composition still works in all cases, but apparently something differs enough that the browsers fail to provide JavaScript events properly. All of this was tested using Chrome, Firefox, and Epiphany (WebKit). -- Reply to this email directly or view it on GitHub: https://github.com/w3c/uievents/issues/343#issuecomment-1611179036 You are receiving this because you are subscribed to this thread. Message ID: <w3c/uievents/issues/343/1611179036@github.com>
Received on Wednesday, 28 June 2023 10:46:05 UTC