feat(chat/web) fixed 2 byte char duplication (#11332)

* feat(chat/web) fixed for 2 byte char duplication on Chat
This commit is contained in:
Calinteodor 2022-04-07 17:03:07 +03:00 committed by GitHub
parent 856ef757d4
commit 41c068feaf
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 12 additions and 0 deletions

View File

@ -219,6 +219,18 @@ class ChatInput extends Component<Props, State> {
* @returns {void}
*/
_onDetectSubmit(event) {
// Composition events used to add accents to characters
// despite their absence from standard US keyboards,
// to build up logograms of many Asian languages
// from their base components or categories and so on.
if (event.isComposing || event.keyCode === 229) {
// keyCode 229 means that user pressed some button,
// but input method is still processing that.
// This is a standard behavior for some input methods
// like entering japanese or сhinese hieroglyphs.
return;
}
if (event.key === 'Enter'
&& event.shiftKey === false
&& event.ctrlKey === false) {