-
Notifications
You must be signed in to change notification settings - Fork 2.6k
Normalize input data application from onBeforeInput and compositionUpdate #1419
base: main
Are you sure you want to change the base?
Conversation
package.json
Outdated
@@ -26,8 +26,8 @@ | |||
"postbuild": "node node_modules/fbjs-scripts/node/check-lib-requires.js lib", | |||
"lint": "eslint .", | |||
"flow": "flow src", | |||
"test": "NODE_ENV=test jest", | |||
"test-ci": "NODE_ENV=test npm run lint && npm run flow && npm run test" | |||
"test": "cross-env NODE_ENV=test jest", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Added to enable running tests cross-plat (Windows)
Had this running on a project for a while and our Android users are infinitely more happy 👍 |
Hey, Octatone, I just wanted to thank you for the work you've done. I'm glad you found my patch set useful as a base to continue working from. Here's hoping that this most recent patch makes it into master. |
Hi @octatone , Could you rebase master into here, and update tests:
Please let us know if you are still interested in pursuing this PR |
@mitermayer Yes, I am still interested in pursuing this PR. I will work on rebasing this ASAP. |
I've got a little more free time around now, if you want/need any help @octatone I'd be glad to be of assistance. |
…r mobile browsers
This continues from facebookarchive#1152 and facebookarchive#1285 making them work together for broad support for polatform inconsistencies.
ae3b1ab
to
2e26a9d
Compare
@mitermayer Rebased against master, tests converted to root tests + snapshots. |
Thank you for your pull request and welcome to our community. We require contributors to sign our Contributor License Agreement, and we don't seem to have you on file. In order for us to review and merge your code, please sign up at https://code.facebook.com/cla. If you are contributing on behalf of someone else (eg your employer), the individual CLA may not be sufficient and your employer may need the corporate CLA signed. If you have received this in error or have any questions, please contact us at cla@fb.com. Thanks! |
Thank you for signing our Contributor License Agreement. We can now accept your code for this (and any) Facebook open source project. Thanks! |
Can't this be merged? It would be really helpful for anyone who needs this to be working in android |
Before submitting a pull request, please make sure the following is done...
master
.npm test
)npm run lint
) and passes Flow (npm run flow
)I should be listed as an authorized contributor via Microsoft.
Summary
Should resolve: #1079 and #1128 there are likely more related issues, but I cannot remember them all.
This pull request attempts to address several issues with text composition on mobile Android, IME behaviors, and browser API inconsistencies. It does not solve all custom Android keyboard issues, but it at least makes the experience with GBoard magnitudes better.
It does so by tracking all input event data, and applying data via the following strategy:
This PR continues from work here: #1285 and here: #1152 Their commits are preserved in this PR - not sure of the implications for CLA.
Test Plan
I have included unit tests to assert the above strategy, however this PR needs more manual testing to verify cross-plat improvements and to find more cases where this strategy does not improve the experience for the user.
Additionally, more work needs to be done (as suggested by @flarnie) to curate order of events for composition modes for the many browser + keyboard + platform combinations.