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

Use USVString for input and composition events #352

Closed
jrandolf-2 opened this issue Jun 26, 2023 · 1 comment · Fixed by #351
Closed

Use USVString for input and composition events #352

jrandolf-2 opened this issue Jun 26, 2023 · 1 comment · Fixed by #351

Comments

@jrandolf-2
Copy link
Contributor

Input and composition events are specified to contain Unicode characters (used in the sense of scalar values) in their data field, however DOMString is declared for this field which allows unmatched surrogate pairs.

Currently, Firefox is the only implementation that does not adhere to this definition.

@drwez
Copy link

drwez commented Jun 27, 2023

Chrome also provides surrogates in input.data, rather than full Unicode code points, on some platforms.

webkit-commit-queue pushed a commit to Ahmad-S792/WebKit that referenced this issue Feb 4, 2024
https://bugs.webkit.org/show_bug.cgi?id=268707

Reviewed by Ryosuke Niwa.

This patch is to align WebKit with Web-Specification:

[1] https://w3c.github.io/uievents/#idl-inputevent
[2] https://w3c.github.io/uievents/#idl-compositionevent

Only change is to modify `data` in both interfaces to `USVString` as per below:

Web-Spec Issue: w3c/uievents#352

* Source/WebCore/dom/InputEvent.idl:
* Source/WebCore/dom/CompositionEvent.idl:

Canonical link: https://commits.webkit.org/274067@main
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 a pull request may close this issue.

2 participants