question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Feature Request: Composition Events (Keyboard API)

See original GitHub issue

We’re using Puppeteer at WordPress, where we’ve created a custom editor. One thing we keep running into is bugs around input composition. Every now and then things break, and we’re not able to create tests for it with Puppeteer. It would be great if Puppeteer provided an additional keyboard API to simulate composing characters with the keyboard.

https://w3c.github.io/uievents/#events-composition-types

In other words, this will not produce è in Puppeteer:

await page.keyboard.down( 'Alt' );
await page.keyboard.type( '`' );
await page.keyboard.up( 'Alt' );
await page.keyboard.type( 'e' );

Thanks for the consideration!

Issue Analytics

  • State:open
  • Created 4 years ago
  • Reactions:2
  • Comments:11

github_iconTop GitHub Comments

3reactions
vocafeuvrecommented, Jul 20, 2021

good news, just found a page about a CDP method called ‘Input.imeSetComposition’ in Chromium Code Review. once this feature is shipped, it might resolve the issue about lack of support upstream. the question now is would Puppeteer be implementing a wrapper around this method?

sources: https://github.com/microsoft/playwright/issues/5777 https://chromium-review.googlesource.com/c/chromium/src/+/2764592

1reaction
ellatrixcommented, Jun 27, 2022

This is still an issue. Just preventing @stale from closing it.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Developers - Feature Request: Composition Events (Keyboard API) -
We're using Puppeteer at WordPress, where we've created a custom editor. One thing we keep running into is bugs around input composition.
Read more >
KeyboardEvent - Web APIs | MDN
KeyboardEvent objects describe a user interaction with the keyboard; each event describes a single interaction between the user and a key ...
Read more >
KeyboardEvent.isComposing - Chrome Platform Status
Feature : KeyboardEvent.isComposing ... Allows an app to determine if there is an active composition outstanding for keyboard events being ...
Read more >
UI Events - W3C
5.6.2 Keyboard Event Key Location; 5.6.3 Keyboard Event Order; 5.6.4 Keyboard Event Types. 5.6.4.1 keydown; 5.6.4.2 keyup. 5.7 Composition ...
Read more >
Elements of a composition - Descript Help
Related articles. Composition properties · Audio-only compositions · Composition overview · Editor panels · Quick guide to keyboard shortcut changes. Was ...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found