diff --git a/packages/login/src/vaadin-login-form.js b/packages/login/src/vaadin-login-form.js index 4ce9806f92..3c89987a7c 100644 --- a/packages/login/src/vaadin-login-form.js +++ b/packages/login/src/vaadin-login-form.js @@ -91,6 +91,7 @@ class LoginForm extends LoginMixin(ElementMixin(ThemableMixin(PolymerElement))) required on-keydown="_handleInputKeydown" spellcheck="false" + autocomplete="current-password" > diff --git a/packages/login/test/login-form.test.js b/packages/login/test/login-form.test.js index a1aa9e9168..4f3ca35f6f 100644 --- a/packages/login/test/login-form.test.js +++ b/packages/login/test/login-form.test.js @@ -257,6 +257,11 @@ describe('login form', () => { const usernameElement = login.$.vaadinLoginUsername; expect(document.activeElement).to.equal(usernameElement.inputElement); }); + + it('should have autocomplete attribute set', () => { + const passwordField = login.$.vaadinLoginPassword; + expect(passwordField.getAttribute('autocomplete')).to.be.equal('current-password'); + }); }); describe('no forgot password', () => {