| Index: ui/webui/resources/js/cr/ui/list.js
|
| diff --git a/ui/webui/resources/js/cr/ui/list.js b/ui/webui/resources/js/cr/ui/list.js
|
| index 32d9b00065726c7fb4b7b86eb7fc48e9eba79326..720f0704ee2d43203d0cc1f73242aaaca512882b 100644
|
| --- a/ui/webui/resources/js/cr/ui/list.js
|
| +++ b/ui/webui/resources/js/cr/ui/list.js
|
| @@ -155,7 +155,7 @@
|
|
|
| /**
|
| * Cached item for measuring the default item size by measureItem().
|
| - * @type {cr.ui.ListItem}
|
| + * @type {ListItem}
|
| */
|
| cachedMeasuredItem_: null,
|
|
|
| @@ -523,7 +523,8 @@
|
| * @private
|
| */
|
| handleElementBlur_: function(e) {
|
| - this.hasElementFocus = false;
|
| + if (!this.contains(e.relatedTarget))
|
| + this.hasElementFocus = false;
|
| },
|
|
|
| /**
|
| @@ -768,7 +769,7 @@
|
| * Takes a value from the data model and finds the associated list item.
|
| * @param {*} value The value in the data model that we want to get the list
|
| * item for.
|
| - * @return {cr.ui.ListItem} The first found list item or null if not found.
|
| + * @return {ListItem} The first found list item or null if not found.
|
| */
|
| getListItem: function(value) {
|
| var dataModel = this.dataModel;
|
| @@ -782,7 +783,7 @@
|
| /**
|
| * Find the list item element at the given index.
|
| * @param {number} index The index of the list item to get.
|
| - * @return {cr.ui.ListItem} The found list item or null if not found.
|
| + * @return {ListItem} The found list item or null if not found.
|
| */
|
| getListItemByIndex: function(index) {
|
| return this.cachedItems_[index] || null;
|
| @@ -790,7 +791,7 @@
|
|
|
| /**
|
| * Find the index of the given list item element.
|
| - * @param {HTMLLIElement} item The list item to get the index of.
|
| + * @param {ListItem} item The list item to get the index of.
|
| * @return {number} The index of the list item, or -1 if not found.
|
| */
|
| getIndexOfListItem: function(item) {
|
| @@ -804,7 +805,7 @@
|
| /**
|
| * Creates a new list item.
|
| * @param {*} value The value to use for the item.
|
| - * @return {!cr.ui.ListItem} The newly created list item.
|
| + * @return {!ListItem} The newly created list item.
|
| */
|
| createItem: function(value) {
|
| var item = new this.itemConstructor_(value);
|
| @@ -1158,7 +1159,7 @@
|
| * updated and restored. Assumed the listItem relates to the same data item
|
| * as the lead item in the begin of the batch update.
|
| *
|
| - * @param {cr.ui.ListItem} leadItem Already existing lead item.
|
| + * @param {ListItem} leadItem Already existing lead item.
|
| */
|
| restoreLeadItem: function(leadItem) {
|
| delete this.cachedItems_[leadItem.listIndex];
|
| @@ -1201,7 +1202,7 @@
|
| * the visible range).
|
| *
|
| * Item returned from this method won't be removed until it remains a lead
|
| - * item or till the data model changes (unlike other items that could be
|
| + * item or til the data model changes (unlike other items that could be
|
| * removed when they go out of the visible range).
|
| *
|
| * @return {cr.ui.ListItem} The lead item for the list.
|
|
|