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

Unified Diff: chrome/browser/resources/extensions/extension_list.js

Issue 971993002: extensions: reinstate trash focus/closing logic after switch to (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: comment Created 5 years, 10 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/extensions/extension_list.js
diff --git a/chrome/browser/resources/extensions/extension_list.js b/chrome/browser/resources/extensions/extension_list.js
index a9363e1ff0137a2e907509c31a06d38e2aa6e31b..16b11322a5281b1d57869ed58818efc5323d9662 100644
--- a/chrome/browser/resources/extensions/extension_list.js
+++ b/chrome/browser/resources/extensions/extension_list.js
@@ -466,6 +466,17 @@ cr.define('extensions', function() {
function() {
// TODO(devlin): What should we do if the uninstall fails?
this.uninstallIsShowing_ = false;
+
+ if (trash.classList.contains('mouse-clicked'))
+ trash.blur();
+
+ if (chrome.runtime.lastError) {
+ // The uninstall failed (e.g. a cancel). Allow the trash to close.
+ trash.classList.remove('open');
+ } else {
+ // Leave the trash open if the uninstall succeded. Otherwise it can
+ // half-close right before it's removed when the DOM is modified.
+ }
}.bind(this));
}.bind(this));
row.querySelector('.enable-controls').appendChild(trash);
@@ -899,13 +910,6 @@ cr.define('extensions', function() {
},
};
- ExtensionList.uninstallCancel = function() {
- var trash = document.querySelector('.trash.open');
- if (trash.classList.contains('mouse-clicked'))
- trash.blur();
- trash.classList.remove('open');
- };
-
return {
ExtensionList: ExtensionList
};
« 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