Created
July 3, 2026 03:55
-
-
Save jonrandy/006342c9149f23d0f66259f362ed1282 to your computer and use it in GitHub Desktop.
How to handle 'enter' form submission WITHOUT breaking IME input (Korean, Japanese, Chinese etc.)
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| // put this in key event - key 229 is legacy (older browser send different 'key' for return while composing) | |
| if (e.isComposing || e.keyCode === 229) return; | |
| // safe to submit here if you want | |
| // https://developer.mozilla.org/en-US/docs/Web/API/KeyboardEvent/isComposing |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment