-
Notifications
You must be signed in to change notification settings - Fork 209
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
fix(number-field): correct composition entry of multi-byte numbers #3610
Conversation
33126f5
to
f407dd9
Compare
Tachometer resultsChromenumber-field permalink
search permalink
slider permalink
textfield permalink
Firefoxnumber-field permalink
search permalink
slider permalink
textfield permalink
|
f407dd9
to
2875fca
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
いいね!お疲れ様でした 🙇 This seems like a good way to handle this issue.
protected handleCompositionEnd(): void { | ||
this.isComposing = false; | ||
requestAnimationFrame(() => { | ||
this.inputElement.dispatchEvent( |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I wish I remembered why I did this in the rAF()
. It's the only part that seems clearly brittle/directly working to not step on the OS's toes, which means easy to break.
Co-authored-by: Westbrook Johnson <[email protected]>
@hunterloftis @Westbrook @najikahalsema Can you please review the latest tests using this fix in https://jira.corp.adobe.com/browse/CCEX-47632 ? It sounds like the behavior is better (for the most part, there's no more double entry) but there is still incorrect behavior depending on browser, OS, and language. |
Description
Current implementation: Intercepts IME-based keystrokes and replaces them with their single-byte cousin.
This change: Accepts all keystrokes until the component is blurred (loses focus), then converts all IME-based characters into their single-byte cousins.
Related issue(s)
Motivation and context
Fix Number Field issues with certain Input Method Editor (IME) input types.
How has this been tested?
Types of changes
Checklist
Best practices
This repository uses conventional commit syntax for each commit message; note that the GitHub UI does not use this by default so be cautious when accepting suggested changes. Avoid the "Update branch" button on the pull request and opt instead for rebasing your branch against
main
.