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.

Support for composition events

See original GitHub issue

So far as I can tell, although jsx.d.ts includes a definition for composition events such as onCompositionEnd, they are not implemented.

Furthermore, while isComposing is available through InputEvent, it is not normalized between browsers so, for example, in Firefox there will be an input event where it is true but there is not in Chrome. Without composition events it is not possible to work around this and, for example, only update search results once the current composition has been committed.

Test case:

https://codesandbox.io/s/bold-currying-vqfq8

Issue Analytics

  • State:open
  • Created 4 years ago
  • Comments:6 (2 by maintainers)

github_iconTop GitHub Comments

1reaction
developitcommented, Oct 5, 2019

Hi @birtles - I think this is actually a case sensitivity issue. My guess is that you’ll find this works:

<input oncompositionend={() => { ... }} />
0reactions
birtlescommented, Oct 5, 2019

Hi @birtles - I think this is actually a case sensitivity issue. My guess is that you’ll find this works:

<input oncompositionend={() => { ... }} />

Oh yes, you’re right. That does indeed work.

Read more comments on GitHub >

github_iconTop Results From Across the Web

CompositionEvent - Web APIs | MDN
Chrome Edge CompositionEvent Full support. Chrome15. Toggle history Full support. Edge1... CompositionEvent() constructor Full support. Chrome26. Toggle history Full support. Edge1... data Full support. Chrome15. Toggle...
Read more >
What is JavaScript's CompositionEvent? Please give ...
Composition Events provide a means for inputing text in a supplementary or alternate manner than by Keyboard Events, in order to allow the...
Read more >
Understanding Composition Browser Events
First, let's take a look at the chain of events in the happy case. User presses the enter key to end the composition....
Read more >
CompositionEvent - Dom
The DOM CompositionEvent represents events that occur due to the user ... In addition, support for the compositionupdate event was added in Gecko...
Read more >
SyntheticEvent
Supported Events · Clipboard Events · Composition Events · Keyboard Events · Focus Events · Form Events · Generic Events · Mouse Events...
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