OLD | NEW |
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 Loading... |
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; | |
298 | 296 |
299 var keyboardEvent = /** @type {!KeyboardEvent} */ (event); | 297 var keyboardEvent = /** @type {!KeyboardEvent} */ (event); |
300 // Ctrl/Cmd + 1-9 should show corresponding panel. | 298 // Ctrl/Cmd + 1-9 should show corresponding panel. |
301 var panelShortcutEnabled = WebInspector.settings.shortcutPanelSwitch.get
(); | 299 var panelShortcutEnabled = WebInspector.settings.shortcutPanelSwitch.get
(); |
302 if (panelShortcutEnabled && !event.shiftKey && !event.altKey) { | 300 if (panelShortcutEnabled && !event.shiftKey && !event.altKey) { |
303 var panelIndex = -1; | 301 var panelIndex = -1; |
304 if (event.keyCode > 0x30 && event.keyCode < 0x3A) | 302 if (event.keyCode > 0x30 && event.keyCode < 0x3A) |
305 panelIndex = event.keyCode - 0x31; | 303 panelIndex = event.keyCode - 0x31; |
306 else if (event.keyCode > 0x60 && event.keyCode < 0x6A && keyboardEve
nt.location === KeyboardEvent.DOM_KEY_LOCATION_NUMPAD) | 304 else if (event.keyCode > 0x60 && event.keyCode < 0x6A && keyboardEve
nt.location === KeyboardEvent.DOM_KEY_LOCATION_NUMPAD) |
307 panelIndex = event.keyCode - 0x61; | 305 panelIndex = event.keyCode - 0x61; |
(...skipping 193 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
501 window.addEventListener("scroll", this._onScrollBound, false); | 499 window.addEventListener("scroll", this._onScrollBound, false); |
502 else | 500 else |
503 window.removeEventListener("scroll", this._onScrollBound, false); | 501 window.removeEventListener("scroll", this._onScrollBound, false); |
504 | 502 |
505 WebInspector.VBox.prototype.doResize.call(this); | 503 WebInspector.VBox.prototype.doResize.call(this); |
506 this._onScroll(); | 504 this._onScroll(); |
507 }, | 505 }, |
508 | 506 |
509 __proto__: WebInspector.VBox.prototype | 507 __proto__: WebInspector.VBox.prototype |
510 }; | 508 }; |
OLD | NEW |