-
Notifications
You must be signed in to change notification settings - Fork 3.8k
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
(feat): Composition support with keyboard.imeSetComposition, keyboard.imeCancelComposition and keyboard.imeCommitComposition #7487
Conversation
…yboard.imeCancelComposition
…ecessary browser hooks
Thanks for the PR! The api here is going to take some work to get right. Aside from nits like camel casing and api names, we need to have a better sense of how user tests should look. I want to reduce the size of this api to make it easier for us to manage and for users to use correctly. For example I don't think we need The point of Can you send some examples of real world tests that use this api? If we can't write a test that uses selection/delay etc, lets leave that out of the api for now. |
Let's remove the |
Here is a proposed API draft. Assumes #7659. // Compose
await page.keyboard.down('s', { eventKey: 's', text: '' }); // Optional
await page.keyboard.up('s', { eventKey: 's' }); // Optional
await page.keyboard.imeSetComposition({ text: 's', selectionStart: 1, selectionEnd: 1 });
await page.keyboard.down('u', { eventKey: 'す', text: '' }); // Optional
await page.keyboard.up('u', { eventKey: 'す' }); // Optional
await page.keyboard.imeSetComposition({ text: 'す', selectionStart: 1, selectionEnd: 1, replacementStart: 0, replacementEnd: 1 });
// Commit
await page.keyboard.insertText('す');
// Cancel
await page.keyboard.down('Escape'); // Optional
await page.keyboard.up('Escape'); // Optional
await page.keyboard.insertText(''); Overall:
|
@JoelEinbinder has there been any more traction on this? I was wondering if this feature was still under development. |
Hey, @t-javierc are you still working on this PR? I'd be happy to help with it, or continue it if you have not? |
I followed up with a patched version of this PR, rebased with changes from main. #9535 |
Hi! @trueadm, thanks for working on this! t-javierc has finished his internship at MS and no longer working on this, but this work for IME testing is still in our (Edge Editing team's) backlog. please let us know if you have any feedback on the design, and we can discuss further. thanks! |
@alexkeng Thanks for letting me know. It would be great if we could maybe chat and talk about the design and also this as a general feature. We're building a new text editor at Facebook (we hope to open source it soon) that already powers many parts of Facebook. IME automated testing is going to play a very important role and it would be awesome if we could sync up. My email is domgan [at] fb.com if you want to talk more. |
Closing this in favor of #9535 |
Implemented composition support.
Related feature thread: #5777
Chromium changes are currently in review: https://chromium-review.googlesource.com/c/chromium/src/+/3009937