Topic
#forms
2 pieces
まだ
変換中なのに 発火する Enterキー 日本語の
変換を Enterで 確定した 瞬間、 素朴な ハンドラは 単語の 途中で フォームを 送信してしまう。 原因は 確定の キー入力が 普通の Enterに 見える こと(isComposing / keyCode 229)で、 直し方は ガード一行。 The Enter key that fires while you're still typing
Press Enter to confirm a Japanese IME conversion and a naive handler submits the form mid-word. The cause is that the confirming keypress looks like a normal Enter (isComposing / keyCode 229), and the fix is one guard clause.