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 (#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)
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.activeEditContextis added (#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.activeEditContextand 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)