Skip to content

PasswordFieldFix #9493

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 3 commits into from
Jun 27, 2022
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions src/libs/ComponentUtils/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,11 @@
* Web password field needs `current-password` as autocomplete type which is not supported on native
*/
const PASSWORD_AUTOCOMPLETE_TYPE = 'current-password';
const NEW_PASSWORD_AUTOCOMPLETE_TYPE = 'new-password';
const ACCESSIBILITY_ROLE_FORM = 'form';

export {
PASSWORD_AUTOCOMPLETE_TYPE,
ACCESSIBILITY_ROLE_FORM,
NEW_PASSWORD_AUTOCOMPLETE_TYPE,
};
2 changes: 2 additions & 0 deletions src/libs/ComponentUtils/index.native.js
Original file line number Diff line number Diff line change
@@ -1,7 +1,9 @@
const PASSWORD_AUTOCOMPLETE_TYPE = 'password';
const NEW_PASSWORD_AUTOCOMPLETE_TYPE = 'password-new';
const ACCESSIBILITY_ROLE_FORM = 'none';

export {
PASSWORD_AUTOCOMPLETE_TYPE,
ACCESSIBILITY_ROLE_FORM,
NEW_PASSWORD_AUTOCOMPLETE_TYPE,

This comment was marked as outdated.

};
5 changes: 3 additions & 2 deletions src/pages/settings/NewPasswordForm.js
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ import withLocalize, {
import CONST from '../../CONST';
import styles from '../../styles/styles';
import TextInput from '../../components/TextInput';
import * as ComponentUtils from '../../libs/ComponentUtils';

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