Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
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
1 change: 1 addition & 0 deletions UNRELEASED.md
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@ Use [the changelog guidelines](https://git.io/polaris-changelog-guidelines) to f
- Fixed `errorOverlayText` on `Dropzone` ([#671](https://github.com/Shopify/polaris-react/pull/671))
- Updated the `InlineError` text color, the error border-color on form fields and the error `Icon` color to be the same red. ([#676](https://github.com/Shopify/polaris-react/pull/676))
- Fixed `AppProvider` server side rendering support ([#696](https://github.com/Shopify/polaris-react/pull/696)) (thanks [@sbstnmsch](https://github.com/sbstnmsch) for the [original issue](https://github.com/Shopify/polaris-react/issues/372))
- Fixed `TextField` autocomplete disabling by setting autocomplete="nope" when `autoComplete` prop is `false` ([#708](https://github.com/Shopify/polaris-react/pull/708))

### Documentation

Expand Down
2 changes: 1 addition & 1 deletion src/components/TextField/TextField.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -386,5 +386,5 @@ function normalizeAutoComplete(autoComplete?: boolean) {
if (autoComplete == null) {
return autoComplete;
}
return autoComplete ? 'on' : 'off';
return autoComplete ? 'on' : 'nope';
}
4 changes: 2 additions & 2 deletions src/components/TextField/tests/TextField.test.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -151,11 +151,11 @@ describe('<TextField />', () => {
expect(textField.find('input').prop('autoComplete')).toBeUndefined();
});

it('sets autoComplete to "off" when false', () => {
it('sets autoComplete to "nope" when false', () => {
const textField = shallowWithAppProvider(
<TextField label="TextField" autoComplete={false} onChange={noop} />,
);
expect(textField.find('input').prop('autoComplete')).toBe('off');
expect(textField.find('input').prop('autoComplete')).toBe('nope');
});

it('sets autoComplete to "on" when false', () => {
Expand Down