Skip to content

Commit 7bcbaea

Browse files
committedNov 8, 2021
feat: Disable autocapitalize on Harvest account fields
On mobile devices, we don't want on-screen keyboard to force first word capitalization as we are manipulating user's authentification data (i.e. logins)
1 parent 4015a38 commit 7bcbaea

File tree

2 files changed

+5
-0
lines changed

2 files changed

+5
-0
lines changed
 

‎packages/cozy-harvest-lib/src/components/AccountForm/AccountField.jsx

+1
Original file line numberDiff line numberDiff line change
@@ -97,6 +97,7 @@ export class AccountField extends PureComponent {
9797
...this.props,
9898
name: finalName,
9999
id: `harvest-account-${finalName}`,
100+
autoCapitalize: 'none',
100101
autoComplete: 'off',
101102
className: 'u-m-0', // 0 margin
102103
disabled: disabled,

‎packages/cozy-harvest-lib/src/components/__snapshots__/AccountField.spec.js.snap

+4
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@
22

33
exports[`AccountField render a date field 1`] = `
44
<Field
5+
autoCapitalize="none"
56
autoComplete="off"
67
className="u-m-0"
78
error={false}
@@ -100,6 +101,7 @@ exports[`AccountField render a date field 1`] = `
100101

101102
exports[`AccountField render a dropdown field 1`] = `
102103
<Field
104+
autoCapitalize="none"
103105
className="u-m-0"
104106
error={false}
105107
fieldProps={Object {}}
@@ -193,6 +195,7 @@ exports[`AccountField render a dropdown field 1`] = `
193195

194196
exports[`AccountField render a password field 1`] = `
195197
<PasswordField
198+
autoCapitalize="none"
196199
autoComplete="off"
197200
className="u-m-0"
198201
encrypted={true}
@@ -280,6 +283,7 @@ exports[`AccountField render a password field 1`] = `
280283

281284
exports[`AccountField should render 1`] = `
282285
<Field
286+
autoCapitalize="none"
283287
autoComplete="off"
284288
className="u-m-0"
285289
encrypted={false}

0 commit comments

Comments
 (0)