| 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 ea8cba6ebeb1cf080ae6812328749819d6e2411d..e3f152a3d25024dceb0521bb79720579be12a180 100644
|
| --- a/ui/webui/resources/js/cr/ui/list.js
|
| +++ b/ui/webui/resources/js/cr/ui/list.js
|
| @@ -181,7 +181,7 @@ cr.define('cr.ui', function() {
|
|
|
| if (!this.boundHandleOnChange_) {
|
| this.boundHandleOnChange_ = this.handleOnChange_.bind(this);
|
| - this.boundHandleLeadChange_ = this.handleLeadChange_.bind(this);
|
| + this.boundHandleLeadChange_ = this.handleLeadChange.bind(this);
|
| }
|
|
|
| if (oldSm) {
|
| @@ -596,21 +596,21 @@ cr.define('cr.ui', function() {
|
|
|
| /**
|
| * Handles a change of the lead item from the selection model.
|
| - * @param {Event} pe The property change event.
|
| - * @private
|
| + * @param {Event} e The property change event.
|
| + * @protected
|
| */
|
| - handleLeadChange_: function(pe) {
|
| + handleLeadChange: function(e) {
|
| var element;
|
| - if (pe.oldValue != -1) {
|
| - if ((element = this.getListItemByIndex(pe.oldValue)))
|
| + if (e.oldValue != -1) {
|
| + if ((element = this.getListItemByIndex(e.oldValue)))
|
| element.lead = false;
|
| }
|
|
|
| - if (pe.newValue != -1) {
|
| - if ((element = this.getListItemByIndex(pe.newValue)))
|
| + if (e.newValue != -1) {
|
| + if ((element = this.getListItemByIndex(e.newValue)))
|
| element.lead = true;
|
| - if (pe.oldValue != pe.newValue) {
|
| - this.scrollIndexIntoView(pe.newValue);
|
| + if (e.oldValue != e.newValue) {
|
| + this.scrollIndexIntoView(e.newValue);
|
| // If the lead item has a different height than other items, then we
|
| // may run into a problem that requires a second attempt to scroll
|
| // it into view. The first scroll attempt will trigger a redraw,
|
| @@ -623,7 +623,7 @@ cr.define('cr.ui', function() {
|
| // not the most elegant solution, but no others seem obvious.
|
| var self = this;
|
| window.setTimeout(function() {
|
| - self.scrollIndexIntoView(pe.newValue);
|
| + self.scrollIndexIntoView(e.newValue);
|
| }, 0);
|
| }
|
| }
|
|
|