react-composition-input
react-composition-input copied to clipboard
Chrome 40 and Samsung pinyin keyboard causes double entry
Happens only on Samsung keyboard on a Galaxy Tab E. Google pinyin keyboard seems to be ok.
Fixed by commenting out https://github.com/LeoEatle/react-composition-input/blob/19600525099666026e939958e98e7644cbc4aaf9/src/inputfield.js#L47
Tested on Safari iOS and chrome 74 with that line commented out and seems to work. Why was there a need to set the value back into the text field.
Thank you for your found. What is the meaning of double entry? Is it meaning when we select one character it show up two? If that's the case, I don't quite understand the cause of it.
But yes, you are right about this line event.target.value = userInputValue
. I really don't understand why I add this 😂. Maybe for not modifying event.target.value
. We can just remove it.
If you have time, you can send a PR. Or I'll fix it these days.
After selecting a candidate character. Two characters appear in the text field.
Here is a video: https://photos.app.goo.gl/fjThXRtNjKe71unn7