Intent to prototype: TextEvent and textInput event

799 views
Skip to first unread message

Masayuki Nakano

unread,
Apr 2, 2024, 3:48:16 AMApr 2
to dev-pl...@mozilla.org, Hsin-Yi Tsai, Simon Pieters, Olli Pettay, James Graham
Summary: Dispatch `textInput` event as a default action of `beforeinput`
event for some `inputType` values

`textInput` is the prototype of `beforeinput` event. However, the other
browsers keep supporting the non-standardized `textInput` event even
after shipping `beforeinput`. The event is now dispatched as like a
default action of `beforeinput` event, i.e., implementing it won't
affect to web apps which handles (and prevents default of) `beforeinput`
and similar to `beforeinput`, preventing the default of `textInput`
cancels the builtin editor's command/input handling. The detail of the
behavior was investigated and standardized by Simon Pieters (Thank you
for your work!).

The reason why this is required is, some major web apps use the legacy
`textInput` and only dispatching `beforeinput` event may make them work
odd, and a major editor framework using `textInput` has already been in
maintenance mode but we cannot expect the apps will be updated with
newer framework because it's not easy to migrate. Therefore, we need to
support this legacy event.

If web apps handle both `beforeinput` and `textInput`, users could not
use some web apps. Therefore, I think that it should be enabled in the
nightly channel after QA.

Bug: https://bugzilla.mozilla.org/show_bug.cgi?id=903746

Specification: https://w3c.github.io/uievents/#legacy-textevent-events
and https://w3c.github.io/uievents/event-algo.html#textevent

Platform coverage: all

Preference: dom.events.textevent.enabled

Other browsers: Both Blink and WebKit support it

--
Masayuki Nakano <masa...@d-toybox.com>
Working on DOM, Events, editor and IME handling for Gecko

Masayuki Nakano

unread,
Jun 14, 2024, 4:30:12 AMJun 14
to dev-pl...@mozilla.org, Hsin-Yi Tsai, Simon Pieters, Olli Pettay, James Graham

`textInput` was enabled by default in the Nightly channel starting from the last weekend. In this week, I don't see any regression reports.

I'll make it enabled in the all channels soon. So, 129 will be the first release of it.

See https://groups.google.com/a/mozilla.org/g/dev-platform/c/noIHUpX5tHw/m/_Omnx4AoAQAJ for the detail.

Reply all
Reply to author
Forward
0 new messages