Closed katsumi-axis closed 1 year ago
@katsumi-axis thanks for the suggestion. I am not familiar with the isComposing attribute, is that a common way to fix the issues with such keyboards?
@gencay There are many ways to do it, but given that an API is provided, it seems like one correct implementation method. https://www.stum.de/2016/06/24/handling-ime-events-in-javascript/
document.getElementById('question-input').addEventListener("keydown", function (event) {
if (event.key == "Enter" && !event.shiftKey && !event.isComposing) {
event.preventDefault();
addFreeTextQuestion();
}
});
@gencay modify media/main.js just like this code. Thank you for the great work.
@harley005 @katsumi-axis please check out the v3.9.5 on marketplace. This should now be fixed. Could you confirm?
@harley005 @katsumi-axis please check out the v3.9.5 on marketplace. This should now be fixed. Could you confirm?
@gencay It's work, thank you!
@gencay I confirm it, Thank you for your great work.
I am a user of GitHub and I use a Japanese IME to input Kanji characters. However, I noticed that when using the keydown event in JavaScript, it does not always capture the correct input due to the way that the IME works.
I suggest adding an isComposing check to the keydown event, which will improve the accuracy of input detection for users using Japanese IME with Kanji characters. This will ensure that the event is only triggered once the user has finished composing their input.
Here is an example of the code modification that would need to be made:
I believe that this improvement would benefit many users who use a Japanese IME and would greatly improve their experience with GitHub. Thank you for considering this suggestion.