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

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: Move visibility check 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..f8f19cb3bcfc91500c9660daf3e604d3f975bdc0 100644
--- a/chrome/browser/resources/extensions/extension_list.js
+++ b/chrome/browser/resources/extensions/extension_list.js
@@ -290,6 +290,22 @@ 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.
Devlin 2015/04/14 22:23:55 Drive-by: What param?
+ */
+ updateVisible: function() {
not at google - send to devlin 2015/04/14 21:14:50 TBH "updateVisible" is still too vague for me. Are
Dan Beam 2015/04/14 21:44:13 how about: - updateAndHighlight() - onExtensionsSh
hcarmona 2015/04/14 22:06:24 We can go with onUpdateFinished_() and make it pri
not at google - send to devlin 2015/04/14 22:39:25 Gotcha. Maybe this doesn't make sense, but could t
hcarmona 2015/04/14 23:06:43 Scrolling should happen when the list is loaded, i
+ 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 +354,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