diff --git a/src/buttons/checkbox.spec.ts b/src/buttons/checkbox.spec.ts index 7fc49958bf..5f3378258e 100644 --- a/src/buttons/checkbox.spec.ts +++ b/src/buttons/checkbox.spec.ts @@ -172,6 +172,22 @@ describe('NgbCheckBox', () => { })); }); + describe('auto attributes', () => { + + it('should not have autocomplete attribute set to off', () => { + const fixture = createTestComponent(` + + `); + + fixture.detectChanges(); + const input = fixture.debugElement.nativeElement.querySelector('input'); + expect(input.getAttribute('autocomplete')).toBeNull(); + }); + + }); + }); @Component({selector: 'test-cmp', template: ''}) diff --git a/src/buttons/checkbox.ts b/src/buttons/checkbox.ts index 227ef98b9b..4e40e108bb 100644 --- a/src/buttons/checkbox.ts +++ b/src/buttons/checkbox.ts @@ -19,7 +19,6 @@ const NGB_CHECKBOX_VALUE_ACCESSOR = { @Directive({ selector: '[ngbButton][type=checkbox]', host: { - 'autocomplete': 'off', '[checked]': 'checked', '[disabled]': 'disabled', '(change)': 'onInputChange($event)',