webdriver icon indicating copy to clipboard operation
webdriver copied to clipboard

Inconsistent behavior for `keypress` event for surrogate pairs

Open jrandolf-google opened this issue 2 years ago • 1 comments

In all three browsers, we have inconsistent behavior w.r.t. keypress events with unicode characters that are surrogate pairs.

Specifically, the following behavior is observed:

  • Chrome - No event is emitter.
  • Firefox - Two keypress events are emitted, one for each surrogate pair.
  • Safari - One keypress event is emitted, for the full U32 unit.

The user expectation is probably aligned with Safari's rather than Firefox's, so I propose we align with Safari on this matter.

CC: @whimboo

jrandolf-google avatar May 24 '23 11:05 jrandolf-google

I think the ideal place to discuss this is upstream: https://github.com/w3c/uievents/issues/346

mathiasbynens avatar May 24 '23 12:05 mathiasbynens