Bug 158363 - Web Inspector: add a keyboard shortcut to close the current tab bar item
Summary: Web Inspector: add a keyboard shortcut to close the current tab bar item
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: Web Inspector (show other bugs)
Version: WebKit Nightly Build
Hardware: All All
: P2 Normal
Assignee: Brian Burg
URL:
Keywords: InRadar
Depends on:
Blocks:
 
Reported: 2016-06-03 14:54 PDT by Brian Burg
Modified: 2016-06-08 12:00 PDT (History)
9 users (show)

See Also:


Attachments
Proposed Fix (2.70 KB, patch)
2016-06-03 15:16 PDT, Brian Burg
no flags Details | Formatted Diff | Diff
Archive of layout-test-results from ews122 for ios-simulator-wk2 (613.20 KB, application/zip)
2016-06-03 16:21 PDT, Build Bot
no flags Details

Note You need to log in before you can comment on or make changes to this bug.
Description Brian Burg 2016-06-03 14:54:50 PDT
Cmd-w matches Safari. You can continue to close the window with Shift-Cmd-W, like Safari.
Comment 1 Brian Burg 2016-06-03 14:54:58 PDT
<rdar://problem/22677254>
Comment 2 Timothy Hatcher 2016-06-03 15:01:03 PDT
I worry if we make Command-W close the tab, it will cause developers frustration. You don't commonly close tabs in Inspector. Closing the window is more common.

We could flip the shortcuts from Safari.
Comment 3 Nikita Vasilyev 2016-06-03 15:06:20 PDT
When I want to close Web Inspector I use Command-Option-I.
It matches Chrome DevTools and Firefox DevTools.

I close browser tabs with Command-W all the time
and I hardly ever close tabs Web Inspector.
Comment 4 Brian Burg 2016-06-03 15:16:00 PDT
Created attachment 280470 [details]
Proposed Fix
Comment 5 Timothy Hatcher 2016-06-03 15:19:38 PDT
(In reply to comment #3)
> When I want to close Web Inspector I use Command-Option-I.
> It matches Chrome DevTools and Firefox DevTools.
> 
> I close browser tabs with Command-W all the time
> and I hardly ever close tabs Web Inspector.

I early toggle the Inspector closed with Command-Shift-I. I do close it with Command-W however.
Comment 6 Nikita Vasilyev 2016-06-03 15:31:14 PDT
(In reply to comment #5)
> (In reply to comment #3)
> > When I want to close Web Inspector I use Command-Option-I.
> > It matches Chrome DevTools and Firefox DevTools.
> > 
> > I close browser tabs with Command-W all the time
> > and I hardly ever close tabs Web Inspector.
> 
> I early toggle the Inspector closed with Command-Shift-I. I do close it with
> Command-W however.

I assume you meant Command-Option-I.

Command-W closes undocked Web Inspector. In docked mode it closes
Safari's tab. In Chrome and Firefox it also closes browser's tab
when devtools are docked.
Comment 7 Build Bot 2016-06-03 16:21:05 PDT
Comment on attachment 280470 [details]
Proposed Fix

Attachment 280470 [details] did not pass ios-sim-ews (ios-simulator-wk2):
Output: http://webkit-queues.webkit.org/results/1430791

New failing tests:
fast/scrolling/ios/scrollTo-at-page-load.html
Comment 8 Build Bot 2016-06-03 16:21:08 PDT
Created attachment 280481 [details]
Archive of layout-test-results from ews122 for ios-simulator-wk2

The attached test failures were seen while running run-webkit-tests on the ios-sim-ews.
Bot: ews122  Port: ios-simulator-wk2  Platform: Mac OS X 10.11.4
Comment 9 Brian Burg 2016-06-03 16:40:19 PDT
(In reply to comment #2)
> I worry if we make Command-W close the tab, it will cause developers
> frustration. You don't commonly close tabs in Inspector. Closing the window
> is more common.
> 
> We could flip the shortcuts from Safari.

This seems likely to introduce even more confusion. All browsers and tabbed document apps on OS X use Cmd-w to close a single tab, and Cmd-Shift-w to close the entire window full of tabs. The fact that Cmd-w used to work on the Inspector window is a bug. I think most people would use Cmd-Opt-I anyway.
Comment 10 Timothy Hatcher 2016-06-03 17:01:52 PDT
Comment on attachment 280470 [details]
Proposed Fix

Okay, we should monitor for developer bugs complaining about this and revert if it gets to many complaints.
Comment 11 WebKit Commit Bot 2016-06-03 17:03:30 PDT
Comment on attachment 280470 [details]
Proposed Fix

Clearing flags on attachment: 280470

Committed r201671: <http://trac.webkit.org/changeset/201671>
Comment 12 WebKit Commit Bot 2016-06-03 17:03:34 PDT
All reviewed patches have been landed.  Closing bug.
Comment 13 Brian Burg 2016-06-04 14:24:06 PDT
(In reply to comment #10)
> Comment on attachment 280470 [details]
> Proposed Fix
> 
> Okay, we should monitor for developer bugs complaining about this and revert
> if it gets to many complaints.

OK
Comment 14 Jon Davis 2016-06-08 09:51:29 PDT
This is going to give us a lot of backlash from developers. Changing what is now an innate pattern in their workflow will cause frustration.

And tabs in Web Inspector are not used the same way tabbed browsing is used. We should not do this.
Comment 15 Timothy Hatcher 2016-06-08 09:58:35 PDT
I vote again that we flip the shortcuts, so Command-Shift-W closes tabs.
Comment 16 Brian Burg 2016-06-08 12:00:37 PDT
(In reply to comment #15)
> I vote again that we flip the shortcuts, so Command-Shift-W closes tabs.

I am unhappy that we (have and will continue to) break shortcut compatibility on this with every other tabbed document application on OS X, despite us supporting other shortcuts like next/prev, Cmd-1,9, and so forth. Normally, a user can remap key equivalents to whatever they like. But, our hands are tied because we don't have a real menu bar for Inspector. So, I give up on having nice things.

It should be possible to change this patch's shortcut to Cmd-Sh-W and have no handler for Cmd-W, which will get the default behavior of closing the window.