Skip to content

Commit

Permalink
Use username autoComplete in PDFPasswordForm for Safari
Browse files Browse the repository at this point in the history
  • Loading branch information
rezkiy37 committed Jun 20, 2023
1 parent e6c2704 commit db4b7e9
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion src/components/PDFView/PDFPasswordForm.js
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,8 @@ import compose from '../../libs/compose';
import withLocalize, {withLocalizePropTypes} from '../withLocalize';
import withWindowDimensions, {windowDimensionsPropTypes} from '../withWindowDimensions';
import shouldDelayFocus from '../../libs/shouldDelayFocus';
import * as Browser from '../../libs/Browser';
import CONST from '../../CONST';

const propTypes = {
/** If the submitted password is invalid (show an error message) */
Expand Down Expand Up @@ -104,7 +106,7 @@ class PDFPasswordForm extends Component {
</View>
<TextInput
label={this.props.translate('common.password')}
autoComplete="off"
autoComplete={Browser.getBrowser() === CONST.BROWSER.SAFARI ? 'username' : 'off'}
autoCorrect={false}
textContentType="password"
onChangeText={this.updatePassword}
Expand Down

0 comments on commit db4b7e9

Please sign in to comment.