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

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

Issue 1064573003: Fix scroll regression when specifying an extension id. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years, 8 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 | chrome/browser/resources/extensions/extensions.js » ('j') | 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 637707e0c31e87a92bde6a91c51f53dabc31af1c..2a04ea0db1b7827c73e7befb110b6f6bd59d48ad 100644
--- a/chrome/browser/resources/extensions/extension_list.js
+++ b/chrome/browser/resources/extensions/extension_list.js
@@ -290,6 +290,25 @@ cr.define('extensions', function() {
return this.extensionsUpdated_;
},
+ /**
+ * Updates any element that needs to be visible to update properly.
+ * @param {boolean} visible Whether the extension list is visible.
+ */
+ updateVisibility: function(visible) {
+ if (!visible)
Dan Beam 2015/04/14 20:33:56 i guess I see why you're doing this but it's certa
not at google - send to devlin 2015/04/14 20:38:50 Yeah - it looks odd to me to only be using the par
hcarmona 2015/04/14 21:03:17 Moved the visibility check to the call site and re
+ return;
+
+ this.updateFocusableElements();
+
+ var idToHighlight = this.getIdQueryParam_();
+ if (idToHighlight && $(idToHighlight))
+ this.scrollToNode_(idToHighlight);
+
+ var idToOpenOptions = this.getOptionsQueryParam_();
+ if (idToOpenOptions && $(idToOpenOptions))
+ this.showEmbeddedExtensionOptions_(idToOpenOptions, true);
+ },
+
/** @return {number} The number of extensions being displayed. */
getNumExtensions: function() {
return this.extensions_.length;
@@ -338,14 +357,6 @@ cr.define('extensions', function() {
assertInstanceof(node, ExtensionFocusRow).destroy();
}
}
-
- var idToHighlight = this.getIdQueryParam_();
- if (idToHighlight && $(idToHighlight))
- this.scrollToNode_(idToHighlight);
-
- var idToOpenOptions = this.getOptionsQueryParam_();
- if (idToOpenOptions && $(idToOpenOptions))
- this.showEmbeddedExtensionOptions_(idToOpenOptions, true);
},
/** Updates each row's focusable elements without rebuilding the grid. */
« no previous file with comments | « no previous file | chrome/browser/resources/extensions/extensions.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698