Skip to content

fix(MessageBar): Fix IME language handling - #640

Closed
rebeccaalpert wants to merge 1 commit into
patternfly:6.3.xfrom
rebeccaalpert:cherry-pick
Closed

rebeccaalpert wants to merge 1 commit into
patternfly:6.3.xfrom
rebeccaalpert:cherry-pick

Conversation

@rebeccaalpert

Copy link
Copy Markdown
Member

Cherry-pick to patch branch.

Languages that rely on IME keyboards may use the enter key for final text selection on Mac. The MessageBar also uses enter key for submit. The result was that IME input, such as Japanese, was prematurely submitted. I added an additional check for whether the onCompositionEnd event is complete and also added some additional handling for Safari, which is a little bit of a special case. This should resolve the issue on Mac. I manually checked Edge, Chrome, Safari, and Firefox on my machine with a Japanese keyboard.

Assisted-by: Cursor (used to generate boilerplate for handleCompositionStart/End, etc.)

Languages that rely on IME keyboards may use the enter key for final text selection on Mac. The MessageBar also uses enter key for submit. The result was that IME input, such as Japanese, was prematurely submitted. I added an additional check for whether the onCompositionEnd event is complete and also added some additional handling for Safari, which is a little bit of a special case. This should resolve the issue on Mac. I manually checked Edge, Chrome, Safari, and Firefox on my machine with a Japanese keyboard.

Assisted-by: Cursor (used to generate boilerplate for handleCompositionStart/End, etc.)
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.

1 participant