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

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: 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 this.tabIndex = -1;
Dan Beam 2014/10/27 18:35:00 nit: // <list> isn't focusable by default, but cr.
bondd 2014/10/27 18:46:53 Done.
432 }, 432 },
433 433
434 /** 434 /**
435 * Called when the list hierarchy as a whole loses or gains focus; starts 435 * Called when the list hierarchy as a whole loses or gains focus; starts
436 * or ends editing for the lead item if necessary. 436 * or ends editing for the lead item if necessary.
437 * @param {Event} e The change event. 437 * @param {Event} e The change event.
438 * @private 438 * @private
439 */ 439 */
440 handleListFocusChange_: function(e) { 440 handleListFocusChange_: function(e) {
441 var leadItem = this.getListItemByIndex(this.selectionModel.leadIndex); 441 var leadItem = this.getListItemByIndex(this.selectionModel.leadIndex);
(...skipping 14 matching lines...) Expand all
456 return true; 456 return true;
457 }, 457 },
458 }; 458 };
459 459
460 // Export 460 // Export
461 return { 461 return {
462 InlineEditableItem: InlineEditableItem, 462 InlineEditableItem: InlineEditableItem,
463 InlineEditableItemList: InlineEditableItemList, 463 InlineEditableItemList: InlineEditableItemList,
464 }; 464 };
465 }); 465 });
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