Back to Plate

WebKit Playwright insertText is a direct-input ceiling not a direct composition lane

docs/solutions/logic-errors/2026-04-11-webkit-playwright-inserttext-is-a-direct-input-ceiling-not-a-direct-composition-lane.md

53.0.61.3 KB
Original Source

WebKit Playwright insertText is a direct-input ceiling not a direct composition lane

What happened

After Firefox direct composition proved out through Playwright keyboard.insertText, the next honest question was whether desktop WebKit could do the same.

It cannot, at least in this environment.

On the debug IME surfaces, WebKit insertText('すし') produced:

  • clean committed Slate text
  • clean selection
  • beforeinput:insertText:すし

But it did not produce:

  • beforeinput:insertCompositionText:*
  • input:insertCompositionText:*

Even wrapping it with synthetic compositionstart / compositionend did not upgrade the browser event shape.

Why this matters

This is better than nothing:

  • it proves the WebKit row can commit text cleanly on the direct browser path

But it is still not the same thing as a direct composition proof lane.

So for WebKit:

  • direct input proof exists
  • direct composition proof does not
  • proxy composition remains the honest ceiling in this environment

Reusable rule

For desktop WebKit Playwright IME work:

  • treat keyboard.insertText as a useful direct-input probe
  • do not market it as direct composition proof
  • keep the browser-level proxy composition lane until a browser path emits composition-specific input events for real