Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(419)

Unified Diff: chrome/browser/resources/options/manage_profile_overlay.js

Issue 1564063002: Fixing the hiding error bubble animation bug on second opening of create user dialog. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: After offline discussion using the PageManager to check whether the overlay is visible Created 4 years, 11 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/resources/options/manage_profile_overlay.js
diff --git a/chrome/browser/resources/options/manage_profile_overlay.js b/chrome/browser/resources/options/manage_profile_overlay.js
index 4e9ae665c28f6d89104fb7b4fb7d78c76e73bbbe..152bfc4f10e153f472df9934d704711834a0e853 100644
--- a/chrome/browser/resources/options/manage_profile_overlay.js
+++ b/chrome/browser/resources/options/manage_profile_overlay.js
@@ -371,6 +371,11 @@ cr.define('options', function() {
* @private
*/
receiveExistingSupervisedUsers_: function(supervisedUsers) {
+ // During the creation of a SU, this gets called with a list including
+ // the just-created SU. Ignore, to prevent the "already exists" bubble
+ // from showing up if the overlay is already hidden.
Marc Treib 2016/01/07 17:04:15 nit: Now the comment doesn't really correspond to
atanasova 2016/01/07 17:08:40 Done.
+ if (PageManager.getTopmostVisiblePage().pageDiv != this.pageDiv)
+ return;
$('import-existing-supervised-user-link').hidden =
supervisedUsers.length === 0;
if (!$('create-profile-supervised').checked)
@@ -406,8 +411,10 @@ cr.define('options', function() {
HTMLEscape(elide(newName, /* maxLength */ 50)));
this.showErrorBubble_(errorHtml, 'create', true);
- $('supervised-user-import-existing').onclick =
- this.getImportHandler_(supervisedUsers[i], nameIsUnique);
+ if ($('supervised-user-import-existing')) {
+ $('supervised-user-import-existing').onclick =
+ this.getImportHandler_(supervisedUsers[i], nameIsUnique);
+ }
$('create-profile-ok').disabled = true;
return;
}
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698