Index: chrome/browser/resources/options/deletable_item_list.js |
diff --git a/chrome/browser/resources/options/deletable_item_list.js b/chrome/browser/resources/options/deletable_item_list.js |
index 4f223bad57802ee00c8472335ac9d6207863a788..4941921cd8c0da765485ce196449c6ef146c8841 100644 |
--- a/chrome/browser/resources/options/deletable_item_list.js |
+++ b/chrome/browser/resources/options/deletable_item_list.js |
@@ -136,18 +136,11 @@ cr.define('options', function() { |
var target = e.target; |
if (target.classList.contains('row-delete-button')) { |
+ // A close button does not give any visual indication that its behavior |
+ // would be affected by the current selection, so it should not be. |
Evan Stade
2014/07/31 19:36:07
I just don't think that code comments are the best
engedy
2014/08/01 08:06:25
Done, I have removed the comment.
|
var listItem = this.getListItemAncestor(target); |
- var selected = this.selectionModel.selectedIndexes; |
- |
- // Check if the list item that contains the close button being clicked |
- // is not in the list of selected items. Only delete this item in that |
- // case. |
var idx = this.getIndexOfListItem(listItem); |
- if (selected.indexOf(idx) == -1) { |
- this.deleteItemAtIndex(idx); |
- } else { |
- this.deleteSelectedItems_(); |
- } |
+ this.deleteItemAtIndex(idx); |
} |
}, |