w3c / w3c/webdriver

Inconsistent behavior for `keypress` event for surrogate pairs

Open
#1,741 1 comment 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
HTML
Stars
718
Forks
228
PR merge metrics
No merged PRs in 30d

Description

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

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

The issue names no file or test entry point. Start by reviewing the WebDriver specification's handling of keypress events and the reported Chrome, Firefox, and Safari behavior; done means the specification clearly defines consistent surrogate-pair handling aligned with the intended behavior.

Written by the indexing model from the issue text.

Assessment

Tech stack
html
Domain
web-dev
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.