summaryrefslogtreecommitdiffstats
path: root/ui/webui
diff options
context:
space:
mode:
authorbondd <bondd@chromium.org>2014-11-12 16:16:46 -0800
committerCommit bot <commit-bot@chromium.org>2014-11-13 00:17:11 +0000
commit39698bd5cf1a61e67796b9a855f32321a1d29242 (patch)
tree34e9724b2d217e0abe6003b89d283666057fa2c0 /ui/webui
parent1ad14348963665d58bc65c8c327e00c8c11da0c9 (diff)
downloadchromium_src-39698bd5cf1a61e67796b9a855f32321a1d29242.zip
chromium_src-39698bd5cf1a61e67796b9a855f32321a1d29242.tar.gz
chromium_src-39698bd5cf1a61e67796b9a855f32321a1d29242.tar.bz2
Maintain focused column in chrome://settings/searchEngines
1. Focused column is maintained when pressing up/down in list to change selected list item. 2. Shift+Tab from outside of the list now goes to the last list item field instead of the first one. This CL is part of splitting https://codereview.chromium.org/664583006/ into several smaller CLs. All applicable reviewer comments from that CL have been addressed. This CL depends on https://codereview.chromium.org/683813004/ BUG=428428 Review URL: https://codereview.chromium.org/688043003 Cr-Commit-Position: refs/heads/master@{#303933}
Diffstat (limited to 'ui/webui')
-rw-r--r--ui/webui/resources/js/cr/ui/list.js22
1 files changed, 11 insertions, 11 deletions
diff --git a/ui/webui/resources/js/cr/ui/list.js b/ui/webui/resources/js/cr/ui/list.js
index ea8cba6..e3f152a 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);
}
}