Changeset 201671 in webkit
- Timestamp:
- Jun 3, 2016 5:04:52 PM (8 years ago)
- Location:
- trunk/Source/WebInspectorUI
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/Source/WebInspectorUI/ChangeLog
r201669 r201671 1 2016-06-03 Brian Burg <bburg@apple.com> 2 3 Web Inspector: add a keyboard shortcut to close the current tab bar item 4 https://bugs.webkit.org/show_bug.cgi?id=158363 5 <rdar://problem/22677254> 6 7 Reviewed by Timothy Hatcher. 8 9 Make Cmd-w close the current tab. This matches Safari's keyboard shortcut. 10 11 * UserInterface/Views/TabBrowser.js: 12 (WebInspector.TabBrowser): 13 Don't do anything if the New Tab tab is the only tab bar item besides the 14 pinned "new tab" button. 15 1 16 2016-06-03 Brian Burg <bburg@apple.com> 2 17 -
trunk/Source/WebInspectorUI/UserInterface/Views/TabBrowser.js
r193432 r201671 49 49 this.addSubview(this._contentViewContainer); 50 50 51 var showNextTab = this._showNextTab.bind(this); 52 var showPreviousTab = this._showPreviousTab.bind(this); 51 let showNextTab = () => { this._showNextTab(); } 52 let showPreviousTab = () => { this._showPreviousTab(); } 53 let closeCurrentTab = () => { 54 let selectedTabBarItem = this._tabBar.selectedTabBarItem; 55 if (this._tabBar.tabBarItems.length > 2 || !selectedTabBarItem.isDefaultTab) 56 this._tabBar.removeTabBarItem(selectedTabBarItem); 57 } 58 59 this._closeCurrentTabKeyboardShortuct = new WebInspector.KeyboardShortcut(WebInspector.KeyboardShortcut.Modifier.CommandOrControl, "W", closeCurrentTab); 53 60 54 61 this._showNextTabKeyboardShortcut1 = new WebInspector.KeyboardShortcut(WebInspector.KeyboardShortcut.Modifier.CommandOrControl | WebInspector.KeyboardShortcut.Modifier.Shift, WebInspector.KeyboardShortcut.Key.RightCurlyBrace, showNextTab);
Note: See TracChangeset
for help on using the changeset viewer.