w3c / w3c/edit-context

Improve timing for Update the Text Edit Context

Open
#127 8 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

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

Description

It's a bit strange that Update the Text Edit Context is queued from the update the rendering step, and Chrome doesn't seem to follow this.
Probably the active EditContext should be synchronously changed in the relevant places? (focus, blur, set editContext, focused element is removed/becomes unfocusable) like Chrome does: https://source.chromium.org/chromium/chromium/src/+/main:third_party/blink/renderer/core/dom/document.cc;l=6055;drc=868ed9b7d285b249a3b6dddde4f5fb0f80f608db;bpv=1;bpt=1. Especially if something like document.activeEditContext is added (https://github.com/w3c/edit-context/issues/4) it would be strange to not have it update synchronously.
(There would ideally be web-platform-tests for the timing of this as well, but that's maybe not possible now without document.activeEditContext and with webdriver not supporting composition…)

And maybe the Text Edit Context's text state can be updated in updateText/Selection/etc. instead? (that shouldn't make any observable difference to the behavior anyways I believe since it just affects the IME UI)

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

Start by comparing the current update queued from the rendering step with the referenced Chromium document.cc behavior. Examine timing for focus, blur, set editContext, removal or unfocusable transitions, and updateText/Selection changes; done requires an agreed timing model and corresponding web-platform-tests where feasible.

Written by the indexing model from the issue text.

Assessment

Tech stack
html
Domain
api, testing, web-dev
Issue type
Bug
Difficulty
5/5
Estimated time
Over a week
Activity status
Active
Clarity
Needs clarification
Newbie friendliness
42/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.