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

Side by Side Diff: ui/webui/resources/js/cr/ui/menu_button.js

Issue 1098803002: Context menu is not getting hided in chrome://bookmarks after delete key press. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years, 8 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 | « ui/webui/resources/js/cr/ui/context_menu_handler.js ('k') | 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 // <include src="../../assert.js"> 5 // <include src="../../assert.js">
6 6
7 cr.exportPath('cr.ui'); 7 cr.exportPath('cr.ui');
8 8
9 /** 9 /**
10 * Enum for type of hide. Delayed is used when called by clicking on a 10 * Enum for type of hide. Delayed is used when called by clicking on a
(...skipping 232 matching lines...) Expand 10 before | Expand all | Expand 10 after
243 break; 243 break;
244 case 'Enter': 244 case 'Enter':
245 case 'U+0020': // Space 245 case 'U+0020': // Space
246 if (!this.isMenuShown()) 246 if (!this.isMenuShown())
247 this.showMenu(true); 247 this.showMenu(true);
248 e.preventDefault(); 248 e.preventDefault();
249 break; 249 break;
250 case 'Esc': 250 case 'Esc':
251 case 'U+001B': // Maybe this is remote desktop playing a prank? 251 case 'U+001B': // Maybe this is remote desktop playing a prank?
252 case 'U+0009': // Tab 252 case 'U+0009': // Tab
253 case 'U+007F': // Delete
Bernhard Bauer 2015/04/20 10:46:40 This doesn't seem like the right place to hide the
Deepak 2015/04/20 12:38:35 Thanks for giving me good understanding, I got you
253 this.hideMenu(); 254 this.hideMenu();
254 break; 255 break;
255 } 256 }
256 } 257 }
257 }; 258 };
258 259
259 /** 260 /**
260 * Helper for styling a menu button with a drop-down arrow indicator. 261 * Helper for styling a menu button with a drop-down arrow indicator.
261 * Creates a new 2D canvas context and draws a downward-facing arrow into it. 262 * Creates a new 2D canvas context and draws a downward-facing arrow into it.
262 * @param {string} canvasName The name of the canvas. The canvas can be 263 * @param {string} canvasName The name of the canvas. The canvas can be
(...skipping 37 matching lines...) Expand 10 before | Expand all | Expand 10 after
300 'drop-down-arrow-hover', ARROW_WIDTH, ARROW_HEIGHT, opt_hoverColor); 301 'drop-down-arrow-hover', ARROW_WIDTH, ARROW_HEIGHT, opt_hoverColor);
301 createDropDownArrowCanvas( 302 createDropDownArrowCanvas(
302 'drop-down-arrow-active', ARROW_WIDTH, ARROW_HEIGHT, opt_activeColor); 303 'drop-down-arrow-active', ARROW_WIDTH, ARROW_HEIGHT, opt_activeColor);
303 }; 304 };
304 305
305 // Export 306 // Export
306 return { 307 return {
307 MenuButton: MenuButton, 308 MenuButton: MenuButton,
308 }; 309 };
309 }); 310 });
OLDNEW
« no previous file with comments | « ui/webui/resources/js/cr/ui/context_menu_handler.js ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698