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

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

Issue 2586113002: MD Settings: ignore modified key events in the profile avatar grid (Closed)
Patch Set: closure Created 4 years 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 | « chrome/browser/resources/ntp4/dot_list.js ('k') | chrome/browser/resources/pdf/pdf.js » ('j') | 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 DeletableItemList = options.DeletableItemList; 6 /** @const */ var DeletableItemList = options.DeletableItemList;
7 /** @const */ var DeletableItem = options.DeletableItem; 7 /** @const */ var DeletableItem = options.DeletableItem;
8 /** @const */ var ArrayDataModel = cr.ui.ArrayDataModel; 8 /** @const */ var ArrayDataModel = cr.ui.ArrayDataModel;
9 /** @const */ var ListSingleSelectionModel = cr.ui.ListSingleSelectionModel; 9 /** @const */ var ListSingleSelectionModel = cr.ui.ListSingleSelectionModel;
10 10
(...skipping 736 matching lines...) Expand 10 before | Expand all | Expand 10 after
747 }, 747 },
748 748
749 /** 749 /**
750 * Handles key down events and looks for left and right arrows, then 750 * Handles key down events and looks for left and right arrows, then
751 * dispatches to the currently expanded item, if any. 751 * dispatches to the currently expanded item, if any.
752 * @param {Event} e The keydown event. 752 * @param {Event} e The keydown event.
753 * @private 753 * @private
754 */ 754 */
755 handleKeyLeftRight_: function(e) { 755 handleKeyLeftRight_: function(e) {
756 var id = e.key; 756 var id = e.key;
757 if (e.altKey || e.ctrlKey || e.metaKey || e.shiftKey) 757 if (hasKeyModifiers(e))
758 return; 758 return;
759 if ((id == 'ArrowLeft' || id == 'ArrowRight') && this.expandedItem) { 759 if ((id == 'ArrowLeft' || id == 'ArrowRight') && this.expandedItem) {
760 var cs = this.ownerDocument.defaultView.getComputedStyle(this); 760 var cs = this.ownerDocument.defaultView.getComputedStyle(this);
761 var rtl = cs.direction == 'rtl'; 761 var rtl = cs.direction == 'rtl';
762 if ((!rtl && id == 'ArrowLeft') || (rtl && id == 'ArrowRight')) 762 if ((!rtl && id == 'ArrowLeft') || (rtl && id == 'ArrowRight'))
763 this.expandedItem.selectedIndex--; 763 this.expandedItem.selectedIndex--;
764 else 764 else
765 this.expandedItem.selectedIndex++; 765 this.expandedItem.selectedIndex++;
766 this.scrollIndexIntoView(this.expandedItem.listIndex); 766 this.scrollIndexIntoView(this.expandedItem.listIndex);
767 // Prevent the page itself from scrolling. 767 // Prevent the page itself from scrolling.
(...skipping 184 matching lines...) Expand 10 before | Expand all | Expand 10 after
952 parent.endBatchUpdates(); 952 parent.endBatchUpdates();
953 }, 953 },
954 }; 954 };
955 955
956 return { 956 return {
957 CookiesList: CookiesList, 957 CookiesList: CookiesList,
958 CookieListItem: CookieListItem, 958 CookieListItem: CookieListItem,
959 CookieTreeNode: CookieTreeNode, 959 CookieTreeNode: CookieTreeNode,
960 }; 960 };
961 }); 961 });
OLDNEW
« no previous file with comments | « chrome/browser/resources/ntp4/dot_list.js ('k') | chrome/browser/resources/pdf/pdf.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698