Suggested Fix: Replace the event "keyup" with "keydown" for Compatibility with Chinese IMEs

オープン
#276 コメント 0 件 リアクション 0 件 担当者 0 名 GitHub で見る

まだ誰も着手していません。

評価

難易度
2/5
見積もり時間
1〜3時間
初心者へのやさしさ
45/100
issue の種類
バグ
明瞭さ
おおむね明確
活発さ
停滞
技術スタック
javascript
領域
frontend

調査の方向性

まず JavaScript ソースで AlertifyJS の prompt が使用する keyup ハンドラーを検索し、フォーム送信時に Enter がどのように処理されているかを確認します。説明されているとおり、該当するイベントの使用を keydown に置き換え、その後、中国語 IME の文字選択によって prompt が送信されない一方で、通常のキーボード操作は引き続き使用できることを確認します。

索引モデルが issue の本文から書いたものです。

説明

When typing with a Chinese input method editor (IME) on a computer, users select characters using the arrow keys and the enter key. However, in the AlertifyJS prompt window, pressing enter to select a character triggers the form submission. This causes significant inconvenience for users, as shown in the video.

I subsequently replaced all instances of the “keyup” event in the JS file with “keydown,” which perfectly resolved the issue without affecting usability. This modified version has already been deployed to the website “Hearty Journal”. Therefore, I suggest that the author consider making this adjustment as well.

https://github.com/user-attachments/assets/110837f6-3a80-448a-9a09-d0b24f9b373a

主要言語
JavaScript
スター
2.1k
フォーク
291
PR マージ指標
30日以内にマージされた PR はありません

環境構築

はじめの一歩

  1. issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
  2. 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
  3. リポジトリをフォークし、ブランチを切って変更します。
  4. issue 番号を参照したプルリクエストを送ります。

MohammadYounes/AlertifyJS のほかの issue

MohammadYounes/AlertifyJS の issue をすべて見る

似ている issue

JavaScript の issue をもっと見る

新しい issue をメールで受け取る

初心者向けの GitHub issue を短くまとめたダイジェスト。