-
Notifications
You must be signed in to change notification settings - Fork 51
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Specify the textInput
event
#353
Comments
Ugh... https://chromestatus.com/metrics/feature/timeline/popularity/831 shows it increasing. Too bad we haven't seen it decrease, do we know if this is a few new frameworks that started using it? |
It is used by draft.js, see facebook/react#11211 (though from my analysis, not all sites using it are broken in Firefox). Sites that were broken in Firefox due to this include WhatsApp, Facebook, Twitter, Reddit, and others. The top sites have been addressed by interventions and/or outreach, but for the long tail I think it's a net compat win to support the event. |
Demo with more logging: https://software.hixie.ch/utilities/js/live-dom-viewer/saved/11841
|
Typing Safari TP 171:
Chrome Canary 116:
Firefox Nightly 116:
Typing Safari TP 171:
Chrome Canary 116:
Firefox Nightly 116:
|
About vs. About vs. |
Facebook shipped a replacement of DraftJS, whose name is Lexical, and they have already replaced DraftJS in thier produce with Lexical. So, is it true WhatsApp and Facebook still use DraftJS and broken with the usage of |
Maybe not, but they were broken and there may still be a long tail of sites using DraftJS and are broken in the same way. |
@rniwa is it ok to change the event order in WebKit so that
Edit: filed a new issue for |
As for specifying it, we could add a description in the Legacy sections (as with |
I agree. |
* Specify the textInput event Fixes #353 * void -> undefined in IDL * Move textInput spec into event-algo.bs * Try to fix build errors * Second attempt with build errors * Third attempt with build errors, remove slashes * Fourth attempt, slash more slashes * Don't fire textInput for delete. Fire it on paste. * Fire textInput before compositionend * Set .data for insertParagraph/insertLineBreak * Don't set data to null Also fix a typo (and infinite recursion) in initialize a TextEvent. * Move IDL back to the main spec so that wpt will pick it up * Don't fire textInput when pressing Enter in <input>
Chromium and WebKit support a
textInput
event, which is similar tobeforeinput
. Firefox doesn't support it (yet), but this is a common web compat issue, so we plan to implement it.Bugs:
IDL:
One interop difference I've found so far is the order of events. Demo: https://software.hixie.ch/utilities/js/live-dom-viewer/saved/11385
The text was updated successfully, but these errors were encountered: