AlertifyJS icon indicating copy to clipboard operation
AlertifyJS copied to clipboard

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

Open chennien opened this issue 6 months ago • 0 comments

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

chennien avatar Aug 09 '24 04:08 chennien