Bug 234973 - Persist state when editing entries in password manager (211352). r=steveck draft
authorAshhar Hasan <hashhar_dev@outlook.com>
Sat, 11 Mar 2017 18:07:44 +0530
changeset 497039 baf893559fc4f81e0532891976c6c3a20d9d88d4
parent 497037 f39c9e5429e5651401c67c7b42b5126c7c33fa1a
child 548792 a76b333c6e00d7e5906a4469864604dd3684a5c3
push id48790
push userbmo:hashhar_dev@outlook.com
push dateSat, 11 Mar 2017 12:42:01 +0000
reviewerssteveck
bugs234973, 211352
milestone55.0a1
Bug 234973 - Persist state when editing entries in password manager (211352). r=steveck This fixes the related issue 211352. This commit uses the global variable savedSelection introduced in previous commit to also persist state when a login is modified. MozReview-Commit-ID: GIpxTz3D2iM
toolkit/components/passwordmgr/content/passwordManager.js
--- a/toolkit/components/passwordmgr/content/passwordManager.js
+++ b/toolkit/components/passwordmgr/content/passwordManager.js
@@ -212,16 +212,17 @@ let signonsTreeView = {
     let table = GetVisibleLogins();
     function _editLogin(field) {
       if (value == table[row][field]) {
         return;
       }
       let existingLogin = table[row].clone();
       table[row][field] = value;
       table[row].timePasswordChanged = Date.now();
+      savedSelection = row;
       Services.logins.modifyLogin(existingLogin, table[row]);
       signonsTree.treeBoxObject.invalidateRow(row);
     }
 
     if (col.id == "userCol") {
      _editLogin("username");
 
     } else if (col.id == "passwordCol") {