From 9928067a41397bb707378aea8c7fb2d69228983d Mon Sep 17 00:00:00 2001 From: Daniil Senkiv Date: Thu, 31 Oct 2019 13:31:39 +0300 Subject: [PATCH] Web.Components: EmailInput: changed input type to 'text'. Reason: unstable working with type 'email'. Bugs in react: https://github.com/facebook/react/issues/14168 https://github.com/facebook/react/issues/6368 --- web/ASC.Web.Components/src/components/email-input/index.js | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/web/ASC.Web.Components/src/components/email-input/index.js b/web/ASC.Web.Components/src/components/email-input/index.js index 8b129c32f6..535da890c2 100644 --- a/web/ASC.Web.Components/src/components/email-input/index.js +++ b/web/ASC.Web.Components/src/components/email-input/index.js @@ -4,7 +4,6 @@ import PropTypes from 'prop-types' import isEqual from "lodash/isEqual"; import TextInput from '../text-input' import { EmailSettings, parseAddress, checkAndConvertEmailSettings, isEqualEmailSettings } from '../../utils/email/'; -import punycode from 'punycode'; const borderColor = { default: '#D0D5DA', @@ -79,9 +78,7 @@ class EmailInput extends React.Component { onChangeAction = (e) => { this.props.onChange && this.props.onChange(e); -// Google Chrome doesn't support IDN for TLDs and is converting them to Punycode. There is variable 'inputValue' against Chrome`s converting - const inputValue = punycode.toUnicode(e.target.value); - this.props.customValidateFunc ? this.props.customValidateFunc(e) : this.checkEmail(inputValue); + this.props.customValidateFunc ? this.props.customValidateFunc(e) : this.checkEmail(e.target.value); } shouldComponentUpdate(nextProps, nextState) { @@ -100,7 +97,7 @@ class EmailInput extends React.Component { isValidEmail={isValid || isValidEmail} value={inputValue} onChange={this.onChangeAction} - type='email' + type='text' onValidateInput={onValidateInput} {...rest} />