[FIX] Rocket.Chat 3.0.12 Livechat issue about Korean IME #403#538
[FIX] Rocket.Chat 3.0.12 Livechat issue about Korean IME #403#538ian902792 wants to merge 1 commit intoRocketChat:developfrom
Conversation
|
ian.yu seems not to be a GitHub user. You need a GitHub account to be able to sign the CLA. If you have already a GitHub account, please add the email address used for this commit to your account. You have signed the CLA already but the status is still pending? Let us recheck it. |
|
Contributor License Agreement page show "You have agreed to the CLA for RocketChat/Rocket.Chat.Livechat" |
|
May I asked when will this be merged? |
| } | ||
| }; | ||
|
|
||
| let inputLock = false; |
There was a problem hiding this comment.
Why did you implement a global variable rather than an internal state variable?
|
|
||
| handleInput = (onChange) => () => { | ||
| onChange && onChange(this.el.innerText); | ||
| if (!inputLock) { |
There was a problem hiding this comment.
| if (!inputLock) { | |
| if (inputLock) { | |
| return; | |
| } | |
| onChange && onChange(this.el.innerText); |
| } | ||
| )} | ||
|
|
||
| oncompositionstart={(e)=>{ |
There was a problem hiding this comment.
| oncompositionstart={(e)=>{ | |
| onCompositionStart={(e)=>{ |
Use camelCase to write event names: https://reactjs.org/docs/events.html#composition-events
|
Thank you @ian902792 for the suggestion! In the future we will improve the composer as a more complex input component. For now is more concise to deal with the problem in that way: #674 |
This way can fix IME input method problem(Such as, Korean、Japanese、Chinese).
Because preact.js has SyntheticEvent issue.
Therefore, oncompositionstart & oncompositionend are all lowercase.
Reference