react-composition-input icon indicating copy to clipboard operation
react-composition-input copied to clipboard

Chrome 40 and Samsung pinyin keyboard causes double entry

Open cyph84 opened this issue 5 years ago • 2 comments

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.

cyph84 avatar May 06 '19 06:05 cyph84

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.

LeoEatle avatar May 06 '19 12:05 LeoEatle

After selecting a candidate character. Two characters appear in the text field.

Here is a video: https://photos.app.goo.gl/fjThXRtNjKe71unn7

cyph84 avatar May 17 '19 06:05 cyph84