Interop issues with composition events and IMEs like the OSX emoji picker and accent menu of Western keyboard layout
Categories
(Core :: DOM: Events, defect, P3)
Tracking
()
People
(Reporter: twisniewski, Assigned: masayuki)
References
(Depends on 1 open bug, Regressed 1 open bug)
Details
Attachments
(3 files)
The attached test-case has a <div contenteditable>
.
When the OSX emoji picker is used to add an emoji to this div, Firefox fires composition events, while Chrome and Safari do not.
(One can trigger the picker by pressing ctrl-command-spacebar while the div
is focused).
I'm not sure whether this is a bug in Chrome/Safari's handling of the picker, as I'm unclear on how the picker plays with all of the partial-commit stuff in the spec (but it's still an obvious interop issue that is affecting WhatsApp's interaction with the OSX emoji picker).
Reporter | ||
Updated•6 years ago
|
Comment 1•6 years ago
|
||
(In reply to Thomas Wisniewski [:twisniewski] (PTO Dec 24-26, 31-2nd) from comment #0)
The attached test-case has a
<div contenteditable>
.
Hi Thomas,
Seems you forgot to attach a test case as you planned to? :)
When the OSX emoji picker is used to add an emoji to this div, Firefox fires composition events, while Chrome and Safari do not.
(One can trigger the picker by pressing ctrl-command-spacebar while the
div
is focused).I'm not sure whether this is a bug in Chrome/Safari's handling of the picker, as I'm unclear on how the picker plays with all of the partial-commit stuff in the spec (but it's still an obvious interop issue that is affecting WhatsApp's interaction with the OSX emoji picker).
Hi Masayuki,
Can you please check if we're doing the right thing according to the spec? Thank you.
Reporter | ||
Comment 2•6 years ago
|
||
Oops, yes I did somehow miss adding the test. Here it is.
Assignee | ||
Comment 3•6 years ago
|
||
Well, difficult to say...
If input source is not keyboard, we use a set of composition events to represent a text input since really old version. I.e., current our behavior is by design.
Additionally, Japanese IME has similar pallet to input any Unicode characters. So, our behavior was implemented for supporting such function of IME. I.e., this means that broken apps due this difference do not support emoji input from IME anyway. So, I think that they should fix their bug. E.g., Japanese users can input an emoji with typing name of it with IME so that emoji characters can come with composition events in any browsers.
Assignee | ||
Comment 4•6 years ago
|
||
I mean that, perhaps, this incompatible behavior should be fixed after implementing beforeinput
. However, such broken apps do not support emoji input via IME anyway.
Comment 5•6 years ago
|
||
Thanks for the comment, Masayuki. Let me set dependency with beforeinput event bug so that we remember to revisit it after that is implemented.
Assignee | ||
Updated•6 years ago
|
Comment 6•6 years ago
|
||
Migrating Webcompat whiteboard priorities to project flags. See bug 1547409.
Comment 7•6 years ago
|
||
See bug 1547409. Migrating whiteboard priority tags to program flags.
Updated•6 years ago
|
Updated•5 years ago
|
Updated•5 years ago
|
Comment 8•4 years ago
|
||
The original issue in https://webcompat.com/issues/13503 has been resolved by the website, though this test case should still be valid.
We haven't seen other reports of this problem pop up yet in the wild.
Assignee | ||
Comment 9•3 years ago
|
||
This incompatibility causes not allowing web apps to cancel the inserting text from emoji picker and accent menu of Western keyboard layouts with beforeinput
event listeners since beforeinput
events for composition are not cancelable.
Assignee | ||
Comment 10•3 years ago
|
||
I wrote patches, but I'm struggling with intermittent failure of the test. Perhaps, it's caused by the race between focus to a content process and dispatching new event.
https://treeherder.mozilla.org/jobs?repo=try&revision=4f8425d37e38dbaa1fba1c7d527885b54f10bafa
Assignee | ||
Comment 11•3 years ago
|
||
For inserting text from OS in special cases, e.g., when inserting 2 or more characters
per keydown or inserting text without key press, we use a set of composition events on
macOS, but the other browsers don't use composition events. Instead, they expose only
beforeinput
event and input
event. We should follow their behavior for web-compat
because beforeinput
events for IME composition are never cancelable, but the
beforeinput
events for the cases are cancelable of the other browsers.
Assignee | ||
Comment 12•3 years ago
|
||
Like the other browsers, we should stop dispatching a set of composition
events when insertText:
is called by Emoji picker, accent character
picker of some Western keyboard layouts. Then, corresponding
beforeinput
event becomes cancelable like the other browsers'.
Depends on D114826
Comment 13•3 years ago
|
||
Comment 14•3 years ago
|
||
Backed out for causing build bustages.
Backout link: https://hg.mozilla.org/integration/autoland/rev/77737e5ac216842c046b8a792cad3779db0ef932
Failure log: https://treeherder.mozilla.org/logviewer?job_id=339977221&repo=autoland&lineNumber=8240
Assignee | ||
Updated•3 years ago
|
Comment 15•3 years ago
|
||
Comment 16•3 years ago
|
||
bugherder |
https://hg.mozilla.org/mozilla-central/rev/37f8398e1257
https://hg.mozilla.org/mozilla-central/rev/9fd5512f7f4c
Updated•3 years ago
|
Description
•