w3c / w3c/edit-context

When EditContext.updateSelection is called with offset between a surrogate pair, what should happen?

Open
#28 1 comment 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

i18n-tracker
Dominant language
HTML
Stars
48
Forks
13
PR merge metrics
No merged PRs in 30d

Description

Options:

  1. Align to start and/or end of surrogate pair(s)
  2. Throw an exception
  3. Do nothing

Perhaps, w3c/editing#1 is reasonable. If selectionStart is middle of a surrogate pair, align to start (or end?) of the surrogate pair. If selectionEnd is middle of a surrogate pair, align to end (or start?) of the surrogate pair. (but if the range is collapsed in a surrogate pair, this logic extends the range, perhaps, this would cause unexpected behavior.)

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

Review the EditContext.updateSelection question and the referenced w3c/editing#1 discussion first. Decide how offsets inside surrogate pairs should behave, including the collapsed-range case, and document the chosen behavior for the API.

Written by the indexing model from the issue text.

Assessment

Tech stack
html
Domain
api
Issue type
Feature
Difficulty
5/5
Estimated time
Over a week
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.