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 baf893559fc4
parent 497037 f39c9e5429e5
child 548792 a76b333c6e00
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") {