Skip to content

Commit 1a0b841

Browse files
authored
Merge pull request #9493 from Harshdeepjoshi/PasswordFieldFix
PasswordFieldFix
2 parents 461f356 + 4f665cf commit 1a0b841

File tree

3 files changed

+7
-2
lines changed

3 files changed

+7
-2
lines changed

src/libs/ComponentUtils/index.js

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,9 +2,11 @@
22
* Web password field needs `current-password` as autocomplete type which is not supported on native
33
*/
44
const PASSWORD_AUTOCOMPLETE_TYPE = 'current-password';
5+
const NEW_PASSWORD_AUTOCOMPLETE_TYPE = 'new-password';
56
const ACCESSIBILITY_ROLE_FORM = 'form';
67

78
export {
89
PASSWORD_AUTOCOMPLETE_TYPE,
910
ACCESSIBILITY_ROLE_FORM,
11+
NEW_PASSWORD_AUTOCOMPLETE_TYPE,
1012
};
Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,9 @@
11
const PASSWORD_AUTOCOMPLETE_TYPE = 'password';
2+
const NEW_PASSWORD_AUTOCOMPLETE_TYPE = 'password-new';
23
const ACCESSIBILITY_ROLE_FORM = 'none';
34

45
export {
56
PASSWORD_AUTOCOMPLETE_TYPE,
67
ACCESSIBILITY_ROLE_FORM,
8+
NEW_PASSWORD_AUTOCOMPLETE_TYPE,
79
};

src/pages/settings/NewPasswordForm.js

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@ import withLocalize, {
88
import CONST from '../../CONST';
99
import styles from '../../styles/styles';
1010
import TextInput from '../../components/TextInput';
11+
import * as ComponentUtils from '../../libs/ComponentUtils';
1112

1213
const propTypes = {
1314
/** String to control the first password box in the form */
@@ -71,8 +72,8 @@ class NewPasswordForm extends React.Component {
7172
<TextInput
7273
label={`${this.props.translate('setPasswordPage.enterPassword')}`}
7374
secureTextEntry
74-
autoCompleteType="password"
75-
textContentType="password"
75+
autoComplete={ComponentUtils.NEW_PASSWORD_AUTOCOMPLETE_TYPE}
76+
textContentType="newPassword"
7677
value={this.props.password}
7778
onChangeText={password => this.props.updatePassword(password)}
7879
onBlur={() => this.onBlurNewPassword()}

0 commit comments

Comments
 (0)