[Password Manager] [Username editing] New username value is not saved |
||
Issue description0. Visit any password form. 1. Type password. 2. Open a fallback for saving. 3. Edit username. 4. Click save. Expected: The updated username should be saved. Actual: Saved old username value. Assign to melandory@, since irmakk cannot be a bug owner.
,
Aug 18 2017
Taking a look now.
,
Aug 18 2017
I don't have a development environment for Mac and the bug only happens on Mac. I think the issue is that model->OnUsernameEdited() should be called in disableEditMode, not in controlTextDidEndEditing and that onSaveClicked should then call disableEditMode. But this is just a guess.
,
Aug 18 2017
Here is a fix. But I did not get to writing a unittest nor properly verifying the fix locally. It took forever to set up my machine. https://chromium-review.googlesource.com/621346
,
Aug 21 2017
Hi! Fix is on the way here; https://chromium-review.googlesource.com/c/623669 Also added a test for this case. :) Little bit more on the explanation side: This does not happen when user saves the password after disabling the edit mode, with pressing enter or tab or any other way that will cause the field to lose focus. This happens, however, when user clicks save button without exiting the edit mode. The old username was saved because we were updating the username *after* the editing is done, and since user clicked save button while still in editing mode, the old username was saved. With current fix, we check the editing mode before saving and updating the username in still-in-edit-mode case.
,
Aug 21 2017
Thanks Irmak.
,
Aug 22 2017
The following revision refers to this bug: https://chromium.googlesource.com/chromium/src.git/+/2b0a69bac57aa7e1114d147318fab9a4b8e2b91b commit 2b0a69bac57aa7e1114d147318fab9a4b8e2b91b Author: Irmak Kavasoğlu <irmakk@google.com> Date: Tue Aug 22 12:42:08 2017 Fixed the browser crash after editing username and saving & not saving edited username problems This cl covers 2 bugs. Bug 756121: When user edits username, and clicks save button without exiting the editing mode, browser crashes (on Mac platform, Canary). This is because when save button closes the bubble, the editable field loses focus and losing focus causesa notification to the delegate which has been destroyed by dismissing the bubble. Bug 756798 : When user edits username, and clicks save button without exiting the editing mode, old username is saved (on Mac platform, Chromium). This is because the username is updated after exiting the edit mode, and clicking save button while editing the username causes the old username to be saved. With this cl, when user clicks save button, the edit mode is checked first. If edit mode is on, the username is updated and edit mode is switched off before continuing the saving procedure. Also, unit test added for the case. Bug: 756121, 756798 Change-Id: Ic5c1ea7ff61ca1f0333dad42ec896d1a8d4b87e1 Reviewed-on: https://chromium-review.googlesource.com/623669 Commit-Queue: Irmak Kavasoğlu <irmakk@google.com> Reviewed-by: Vasilii Sukhanov <vasilii@chromium.org> Reviewed-by: Tatiana Gornak <melandory@chromium.org> Cr-Commit-Position: refs/heads/master@{#496286} [modify] https://crrev.com/2b0a69bac57aa7e1114d147318fab9a4b8e2b91b/chrome/browser/ui/cocoa/passwords/save_pending_password_view_controller.mm [modify] https://crrev.com/2b0a69bac57aa7e1114d147318fab9a4b8e2b91b/chrome/browser/ui/cocoa/passwords/save_pending_password_view_controller_unittest.mm
,
Aug 25 2017
|
||
►
Sign in to add a comment |
||
Comment 1 by kolos@chromium.org
, Aug 18 2017