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 0b3e4605be900579600d8f70e25979f9c1db02ab..327dd42bcb4f2cd4ca2ff269003214a3f4dc7411 100644 |
--- a/chrome/browser/resources/extensions/extension_list.js |
+++ b/chrome/browser/resources/extensions/extension_list.js |
@@ -273,14 +273,19 @@ cr.define('extensions', function() { |
case EventType.ERROR_ADDED: |
case EventType.ERRORS_REMOVED: |
case EventType.PREFS_CHANGED: |
- if (eventData.extensionInfo) |
+ if (eventData.extensionInfo) { |
this.updateExtension_(eventData.extensionInfo); |
+ this.focusGrid_.ensureRowActive(); |
+ } |
break; |
case EventType.UNINSTALLED: |
var index = this.getIndexOfExtension_(eventData.item_id); |
this.extensions_.splice(index, 1); |
var childNode = $(eventData.item_id); |
childNode.parentNode.removeChild(childNode); |
+ this.focusGrid_.removeRow(assertInstanceof(childNode, |
+ ExtensionFocusRow)); |
+ this.focusGrid_.ensureRowActive(); |
break; |
default: |
assertNotReached(); |
@@ -389,9 +394,6 @@ cr.define('extensions', function() { |
* @private |
*/ |
showExtensionNodes_: function() { |
- // Remove the rows from |focusGrid_| without destroying them. |
- this.focusGrid_.rows.length = 0; |
Dan Beam
2015/05/12 01:28:42
why could we just clear this but can't now?
hcarmona
2015/05/12 02:00:47
This function used to be called every time the gri
|
- |
// Any node that is not updated will be removed. |
var seenIds = []; |
@@ -669,6 +671,10 @@ cr.define('extensions', function() { |
// Maintain the order that nodes should be in when creating as well as |
// when adding only one new row. |
this.insertBefore(row, nextNode); |
+ var nextRow = null; |
+ if (nextNode) |
+ nextRow = assertInstanceof(nextNode, ExtensionFocusRow); |
+ this.focusGrid_.addRowBefore(row, nextRow); |
this.updateNode_(extension, row); |
Dan Beam
2015/05/12 01:28:42
needs more \n
hcarmona
2015/05/12 02:00:47
Done.
|
}, |
@@ -1025,7 +1031,6 @@ cr.define('extensions', function() { |
} |
row.updateFocusableElements(); |
- this.focusGrid_.addRow(row); |
}, |
/** |