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

Side by Side Diff: Source/devtools/front_end/InspectorView.js

Issue 214453003: [DevTools] Don't handle shortcuts while dialog is open. (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Created 6 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 | « Source/devtools/front_end/Dialog.js ('k') | Source/devtools/front_end/Main.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 /* 1 /*
2 * Copyright (C) 2011 Google Inc. All rights reserved. 2 * Copyright (C) 2011 Google Inc. All rights reserved.
3 * 3 *
4 * Redistribution and use in source and binary forms, with or without 4 * Redistribution and use in source and binary forms, with or without
5 * modification, are permitted provided that the following conditions are 5 * modification, are permitted provided that the following conditions are
6 * met: 6 * met:
7 * 7 *
8 * * Redistributions of source code must retain the above copyright 8 * * Redistributions of source code must retain the above copyright
9 * notice, this list of conditions and the following disclaimer. 9 * notice, this list of conditions and the following disclaimer.
10 * * Redistributions in binary form must reproduce the above 10 * * Redistributions in binary form must reproduce the above
(...skipping 275 matching lines...) Expand 10 before | Expand all | Expand 10 after
286 if (event.charCode < 32 && WebInspector.isWin()) 286 if (event.charCode < 32 && WebInspector.isWin())
287 return; 287 return;
288 clearTimeout(this._keyDownTimer); 288 clearTimeout(this._keyDownTimer);
289 delete this._keyDownTimer; 289 delete this._keyDownTimer;
290 }, 290 },
291 291
292 _keyDown: function(event) 292 _keyDown: function(event)
293 { 293 {
294 if (!WebInspector.KeyboardShortcut.eventHasCtrlOrMeta(event)) 294 if (!WebInspector.KeyboardShortcut.eventHasCtrlOrMeta(event))
295 return; 295 return;
296 if (WebInspector.Dialog.currentInstance())
297 return;
296 298
297 var keyboardEvent = /** @type {!KeyboardEvent} */ (event); 299 var keyboardEvent = /** @type {!KeyboardEvent} */ (event);
298 // Ctrl/Cmd + 1-9 should show corresponding panel. 300 // Ctrl/Cmd + 1-9 should show corresponding panel.
299 var panelShortcutEnabled = WebInspector.settings.shortcutPanelSwitch.get (); 301 var panelShortcutEnabled = WebInspector.settings.shortcutPanelSwitch.get ();
300 if (panelShortcutEnabled && !event.shiftKey && !event.altKey) { 302 if (panelShortcutEnabled && !event.shiftKey && !event.altKey) {
301 var panelIndex = -1; 303 var panelIndex = -1;
302 if (event.keyCode > 0x30 && event.keyCode < 0x3A) 304 if (event.keyCode > 0x30 && event.keyCode < 0x3A)
303 panelIndex = event.keyCode - 0x31; 305 panelIndex = event.keyCode - 0x31;
304 else if (event.keyCode > 0x60 && event.keyCode < 0x6A && keyboardEve nt.location === KeyboardEvent.DOM_KEY_LOCATION_NUMPAD) 306 else if (event.keyCode > 0x60 && event.keyCode < 0x6A && keyboardEve nt.location === KeyboardEvent.DOM_KEY_LOCATION_NUMPAD)
305 panelIndex = event.keyCode - 0x61; 307 panelIndex = event.keyCode - 0x61;
(...skipping 193 matching lines...) Expand 10 before | Expand all | Expand 10 after
499 window.addEventListener("scroll", this._onScrollBound, false); 501 window.addEventListener("scroll", this._onScrollBound, false);
500 else 502 else
501 window.removeEventListener("scroll", this._onScrollBound, false); 503 window.removeEventListener("scroll", this._onScrollBound, false);
502 504
503 WebInspector.VBox.prototype.doResize.call(this); 505 WebInspector.VBox.prototype.doResize.call(this);
504 this._onScroll(); 506 this._onScroll();
505 }, 507 },
506 508
507 __proto__: WebInspector.VBox.prototype 509 __proto__: WebInspector.VBox.prototype
508 }; 510 };
OLDNEW
« no previous file with comments | « Source/devtools/front_end/Dialog.js ('k') | Source/devtools/front_end/Main.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698