mirror of
https://gitcode.com/GitHub_Trending/ji/jitsi-meet.git
synced 2026-05-14 15:47:47 +00:00
fix(password) use the numeric input mode when only digits are required
Fixes: https://github.com/jitsi/brave-tracker/issues/101
This commit is contained in:
committed by
Saúl Ibarra Corretgé
parent
2292ebe762
commit
48e1f443ea
@@ -140,22 +140,29 @@ class PasswordForm extends Component<IProps, IState> {
|
||||
* @returns {ReactElement}
|
||||
*/
|
||||
_renderPasswordField() {
|
||||
if (this.props.editEnabled) {
|
||||
let placeHolderText = this.props.t('dialog.password');
|
||||
const {
|
||||
editEnabled,
|
||||
passwordNumberOfDigits,
|
||||
t
|
||||
} = this.props;
|
||||
|
||||
if (this.props.passwordNumberOfDigits) {
|
||||
if (editEnabled) {
|
||||
let placeHolderText = t('dialog.password');
|
||||
|
||||
if (passwordNumberOfDigits) {
|
||||
placeHolderText = this.props.t('passwordDigitsOnly', {
|
||||
number: this.props.passwordNumberOfDigits });
|
||||
number: passwordNumberOfDigits });
|
||||
}
|
||||
|
||||
return (
|
||||
<div
|
||||
className = 'info-password-form'>
|
||||
<Input
|
||||
accessibilityLabel = { this.props.t('info.addPassword') }
|
||||
accessibilityLabel = { t('info.addPassword') }
|
||||
autoFocus = { true }
|
||||
id = 'info-password-input'
|
||||
maxLength = { this.props.passwordNumberOfDigits }
|
||||
maxLength = { passwordNumberOfDigits }
|
||||
mode = { passwordNumberOfDigits ? 'numeric' : undefined }
|
||||
onChange = { this._onEnteredPasswordChange }
|
||||
onKeyPress = { this._onKeyPress }
|
||||
placeholder = { placeHolderText }
|
||||
|
||||
Reference in New Issue
Block a user