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

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

Issue 1013683002: Fix for Back navigation keyboard shortcut does not work properly for chrome://settings/cookies. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years, 9 months 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 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 714 matching lines...) Expand 10 before | Expand all | Expand 10 after
725 this.infoNodes[type] = {table: table, info: info}; 725 this.infoNodes[type] = {table: table, info: info};
726 } 726 }
727 }, 727 },
728 728
729 /** 729 /**
730 * Handles key down events and looks for left and right arrows, then 730 * Handles key down events and looks for left and right arrows, then
731 * dispatches to the currently expanded item, if any. 731 * dispatches to the currently expanded item, if any.
732 * @param {Event} e The keydown event. 732 * @param {Event} e The keydown event.
733 * @private 733 * @private
734 */ 734 */
735 handleKeyLeftRight_: function(e) { 735 handleKeyLeftRight_: function(e) {
Dan Beam 2015/03/16 21:16:20 nit: do this instead if (e.altKey || e.ctrlKey ||
736 var id = e.keyIdentifier; 736 var id = e.keyIdentifier;
737 if ((id == 'Left' || id == 'Right') && this.expandedItem) { 737 if (!e.altKey && !e.ctrlKey && !e.metaKey && !e.shiftKey &&
738 (id == 'Left' || id == 'Right') && this.expandedItem) {
738 var cs = this.ownerDocument.defaultView.getComputedStyle(this); 739 var cs = this.ownerDocument.defaultView.getComputedStyle(this);
739 var rtl = cs.direction == 'rtl'; 740 var rtl = cs.direction == 'rtl';
740 if ((!rtl && id == 'Left') || (rtl && id == 'Right')) 741 if ((!rtl && id == 'Left') || (rtl && id == 'Right'))
741 this.expandedItem.selectedIndex--; 742 this.expandedItem.selectedIndex--;
742 else 743 else
743 this.expandedItem.selectedIndex++; 744 this.expandedItem.selectedIndex++;
744 this.scrollIndexIntoView(this.expandedItem.listIndex); 745 this.scrollIndexIntoView(this.expandedItem.listIndex);
745 // Prevent the page itself from scrolling. 746 // Prevent the page itself from scrolling.
746 e.preventDefault(); 747 e.preventDefault();
747 } 748 }
(...skipping 178 matching lines...) Expand 10 before | Expand all | Expand 10 after
926 parent.endBatchUpdates(); 927 parent.endBatchUpdates();
927 }, 928 },
928 }; 929 };
929 930
930 return { 931 return {
931 CookiesList: CookiesList, 932 CookiesList: CookiesList,
932 CookieListItem: CookieListItem, 933 CookieListItem: CookieListItem,
933 CookieTreeNode: CookieTreeNode, 934 CookieTreeNode: CookieTreeNode,
934 }; 935 };
935 }); 936 });
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