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

Side by Side Diff: chrome/browser/resources/options/inline_editable_list.js

Issue 682663002: Fix 'chrome://settings/searchEngines' regression. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Add comment requested by reviewer dbeam@ 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 unified diff | Download patch
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 cr.define('options', function() { 5 cr.define('options', function() {
6 /** @const */ var DeletableItem = options.DeletableItem; 6 /** @const */ var DeletableItem = options.DeletableItem;
7 /** @const */ var DeletableItemList = options.DeletableItemList; 7 /** @const */ var DeletableItemList = options.DeletableItemList;
8 8
9 /** 9 /**
10 * Creates a new list item with support for inline editing. 10 * Creates a new list item with support for inline editing.
(...skipping 410 matching lines...) Expand 10 before | Expand all | Expand 10 after
421 * @type {boolean} 421 * @type {boolean}
422 */ 422 */
423 focusPlaceholder: false, 423 focusPlaceholder: false,
424 424
425 /** @override */ 425 /** @override */
426 decorate: function() { 426 decorate: function() {
427 DeletableItemList.prototype.decorate.call(this); 427 DeletableItemList.prototype.decorate.call(this);
428 this.setAttribute('inlineeditable', ''); 428 this.setAttribute('inlineeditable', '');
429 this.addEventListener('hasElementFocusChange', 429 this.addEventListener('hasElementFocusChange',
430 this.handleListFocusChange_); 430 this.handleListFocusChange_);
431 this.removeAttribute('tabindex'); 431 // <list> isn't focusable by default, but cr.ui.List defaults tabindex to
432 // 0 if it's not set.
433 this.tabIndex = -1;
432 }, 434 },
433 435
434 /** 436 /**
435 * Called when the list hierarchy as a whole loses or gains focus; starts 437 * Called when the list hierarchy as a whole loses or gains focus; starts
436 * or ends editing for the lead item if necessary. 438 * or ends editing for the lead item if necessary.
437 * @param {Event} e The change event. 439 * @param {Event} e The change event.
438 * @private 440 * @private
439 */ 441 */
440 handleListFocusChange_: function(e) { 442 handleListFocusChange_: function(e) {
441 var leadItem = this.getListItemByIndex(this.selectionModel.leadIndex); 443 var leadItem = this.getListItemByIndex(this.selectionModel.leadIndex);
(...skipping 14 matching lines...) Expand all
456 return true; 458 return true;
457 }, 459 },
458 }; 460 };
459 461
460 // Export 462 // Export
461 return { 463 return {
462 InlineEditableItem: InlineEditableItem, 464 InlineEditableItem: InlineEditableItem,
463 InlineEditableItemList: InlineEditableItemList, 465 InlineEditableItemList: InlineEditableItemList,
464 }; 466 };
465 }); 467 });
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698