Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(339)

Unified Diff: ui/webui/resources/js/cr/ui/list.js

Issue 688043003: Maintain focused column in chrome://settings/searchEngines (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@split1_05
Patch Set: Rebase Created 6 years, 1 month ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « chrome/browser/resources/options/search_engine_manager_engine_list.js ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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);
}
}
« no previous file with comments | « chrome/browser/resources/options/search_engine_manager_engine_list.js ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698