| 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 3cff2aa6f58012564a18a3dbda9efec5b2954b72..4d2e68edc3f1c10fb7c411a4b2caf310ba37baa5 100644
|
| --- a/chrome/browser/resources/options/deletable_item_list.js
|
| +++ b/chrome/browser/resources/options/deletable_item_list.js
|
| @@ -52,6 +52,8 @@ cr.define('options', function() {
|
| this.handleMouseDownUpOnClose_);
|
| this.closeButtonElement_.addEventListener('mouseup',
|
| this.handleMouseDownUpOnClose_);
|
| + this.closeButtonElement_.addEventListener('focus',
|
| + this.handleFocus_.bind(this));
|
| this.appendChild(this.closeButtonElement_);
|
| },
|
|
|
| @@ -75,6 +77,18 @@ cr.define('options', function() {
|
| },
|
|
|
| /**
|
| + * Called when a focusable child element receives focus. Selects this item
|
| + * in the list selection model.
|
| + * @private
|
| + */
|
| + handleFocus_: function() {
|
| + var list = this.parentNode;
|
| + var index = list.getIndexOfListItem(this);
|
| + list.selectionModel.selectedIndex = index;
|
| + list.selectionModel.anchorIndex = index;
|
| + },
|
| +
|
| + /**
|
| * Don't let the list have a crack at the event. We don't want clicking the
|
| * close button to change the selection of the list.
|
| * @param {Event} e The mouse down/up event object.
|
|
|