Bug 1619736 - Focus on first input of form when clicking "Create New Login" r=jaws

Differential Revision: https://phabricator.services.mozilla.com/D65220

--HG--
extra : moz-landing-system : lando
This commit is contained in:
mcrawford@mozilla.com 2020-03-05 17:10:19 +00:00
parent ec09510e3c
commit c71171f151
2 changed files with 1 additions and 2 deletions

View File

@ -776,7 +776,6 @@ export default class LoginItem extends HTMLElement {
this._passwordInput.tabIndex = inputTabIndex;
if (shouldEdit) {
this.dataset.editing = true;
this._originInput.focus();
} else {
delete this.dataset.editing;
// Only reset the reveal checkbox when exiting 'edit' mode
@ -812,6 +811,7 @@ export default class LoginItem extends HTMLElement {
// if a new login is being created.
if (this.dataset.isNewLogin) {
this._originDisplayInput.replaceWith(this._originInput);
this._originInput.focus();
} else {
this._originInput.replaceWith(this._originDisplayInput);
}

View File

@ -278,7 +278,6 @@ add_task(async function test_set_login_empty() {
ok(originInput.matches(":invalid"), "origin value is required");
is(originInput.value, "", "origin input should be blank at start");
originInput.focus();
for (let originTuple of [
["ftp://ftp.example.com/", "ftp://ftp.example.com/"],
["https://example.com/", "https://example.com/"],