File tree 1 file changed +7
-1
lines changed
1 file changed +7
-1
lines changed Original file line number Diff line number Diff line change @@ -11,6 +11,8 @@ import compose from '../../libs/compose';
11
11
import withLocalize , { withLocalizePropTypes } from '../withLocalize' ;
12
12
import withWindowDimensions , { windowDimensionsPropTypes } from '../withWindowDimensions' ;
13
13
import shouldDelayFocus from '../../libs/shouldDelayFocus' ;
14
+ import * as Browser from '../../libs/Browser' ;
15
+ import CONST from '../../CONST' ;
14
16
15
17
const propTypes = {
16
18
/** If the submitted password is invalid (show an error message) */
@@ -104,7 +106,11 @@ class PDFPasswordForm extends Component {
104
106
</ View >
105
107
< TextInput
106
108
label = { this . props . translate ( 'common.password' ) }
107
- autoComplete = "off"
109
+ /**
110
+ * This is a workaround to bypass Safari's autofill odd behaviour.
111
+ * This tricks the browser not to fill the username somewhere else and still fill the password correctly.
112
+ */
113
+ autoComplete = { Browser . getBrowser ( ) === CONST . BROWSER . SAFARI ? 'username' : 'off' }
108
114
autoCorrect = { false }
109
115
textContentType = "password"
110
116
onChangeText = { this . updatePassword }
You can’t perform that action at this time.
0 commit comments