Skip to content
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

Normalize CompositionEvent listeners in preact/compat #3430

Merged
merged 2 commits into from
Jan 26, 2022

Conversation

hpneo
Copy link
Contributor

@hpneo hpneo commented Jan 22, 2022

This PR normalizes compositionstart, compositionupdate and compositionend event listeners in the same way Preact already does for beforeinput.

This solves an issue with Slate, where trying to type a character with an accent (like ú) causes an exception.

A similar issue is fixed by this PR (see https://codesandbox.io/s/pensive-cookies-wpdej). See also ianstormtaylor/slate#3903 (comment)

@coveralls
Copy link

Coverage Status

Coverage remained the same at 99.627% when pulling bcefa64 on hpneo:normalize-composition-events into 2af05f5 on preactjs:master.

Copy link
Member

@JoviDeCroock JoviDeCroock left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nice, this looks good, double checked the event reference and there should be no collisions

@JoviDeCroock JoviDeCroock merged commit 98fb678 into preactjs:master Jan 26, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants