Chromium Code Reviews| 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..ebb4517b9723da48f12293db1041ae1d99e20dd3 100644 |
| --- a/chrome/browser/resources/options/deletable_item_list.js |
| +++ b/chrome/browser/resources/options/deletable_item_list.js |
| @@ -94,8 +94,15 @@ cr.define('options', function() { |
| handleFocus_: function() { |
|
Dan Beam
2014/07/30 19:05:34
if (this.selected)
return;
engedy
2014/07/31 09:35:48
Done.
|
| var list = this.parentNode; |
| var index = list.getIndexOfListItem(this); |
| - list.selectionModel.selectedIndex = index; |
| - list.selectionModel.anchorIndex = index; |
| + |
| + // This handler is also fired when the child receives focus as a result of |
| + // the item getting selected by the customized mouse/keyboard handling in |
| + // SelectionController. Take care not to destroy a potential multiple |
| + // selection in this case. |
| + if (!this.selected) { |
| + list.selectionModel.selectedIndex = index; |
| + list.selectionModel.anchorIndex = index; |
| + } |
| }, |
| /** |