Bug 144207

Summary: Web Inspector: Should have a keyboard shortcut to switch between inspector tabs
Product: WebKit Reporter: Joseph Pecoraro <joepeck>
Component: Web InspectorAssignee: Nobody <webkit-unassigned>
Status: RESOLVED FIXED    
Severity: Normal CC: adam.g.helm, commit-queue, graouts, joepeck, jonowells, mattbaker, nvasilyev, timothy, webkit-bug-importer
Priority: P2 Keywords: InRadar
Version: 528+ (Nightly build)   
Hardware: All   
OS: All   
Attachments:
Description Flags
[PATCH] Proposed Fix none

Description Joseph Pecoraro 2015-04-25 20:03:21 PDT
* SUMMARY
Should have a keyboard shortcut to switch between inspector tabs.

This is something I frequently want to do. Though there are keyboard shortcuts to jump directly to certain tabs, moving left/right should also be possible.
Comment 1 Radar WebKit Bug Importer 2015-04-25 20:03:40 PDT
<rdar://problem/20700509>
Comment 2 Joseph Pecoraro 2015-05-28 14:52:35 PDT
Created attachment 253867 [details]
[PATCH] Proposed Fix
Comment 3 Timothy Hatcher 2015-05-28 15:58:51 PDT
Comment on attachment 253867 [details]
[PATCH] Proposed Fix

View in context: https://bugs.webkit.org/attachment.cgi?id=253867&action=review

> Source/WebInspectorUI/ChangeLog:11
> +        Be careful that some keyboard shortcuts, when used inside a text
> +        editor / text field are just text actions. However, some keyboard
> +        shortcuts will work no matter where you trigger them.

Do we need to use WebInspector.isEventTargetAnEditableField to abort early?
Comment 4 Joseph Pecoraro 2015-05-28 18:16:22 PDT
(In reply to comment #3)
> Comment on attachment 253867 [details]
> [PATCH] Proposed Fix
> 
> View in context:
> https://bugs.webkit.org/attachment.cgi?id=253867&action=review
> 
> > Source/WebInspectorUI/ChangeLog:11
> > +        Be careful that some keyboard shortcuts, when used inside a text
> > +        editor / text field are just text actions. However, some keyboard
> > +        shortcuts will work no matter where you trigger them.
> 
> Do we need to use WebInspector.isEventTargetAnEditableField to abort early?

Naw, we match the system here. If you're in a text editor and do something like Shift+Command+Left, it should select text instead of change tabs.
Comment 5 WebKit Commit Bot 2015-05-28 19:06:28 PDT
Comment on attachment 253867 [details]
[PATCH] Proposed Fix

Clearing flags on attachment: 253867

Committed r184974: <http://trac.webkit.org/changeset/184974>
Comment 6 WebKit Commit Bot 2015-05-28 19:06:32 PDT
All reviewed patches have been landed.  Closing bug.
Comment 7 Joseph Pecoraro 2015-06-02 13:53:11 PDT
(In reply to comment #4)
> (In reply to comment #3)
> > Comment on attachment 253867 [details]
> > [PATCH] Proposed Fix
> > 
> > View in context:
> > https://bugs.webkit.org/attachment.cgi?id=253867&action=review
> > 
> > > Source/WebInspectorUI/ChangeLog:11
> > > +        Be careful that some keyboard shortcuts, when used inside a text
> > > +        editor / text field are just text actions. However, some keyboard
> > > +        shortcuts will work no matter where you trigger them.
> > 
> > Do we need to use WebInspector.isEventTargetAnEditableField to abort early?
> 
> Naw, we match the system here. If you're in a text editor and do something
> like Shift+Command+Left, it should select text instead of change tabs.

Oops, yes we do for native editable fields. When I tested this, I tested in the QuickConsole, and code mirror was handling that keyboard input and I was seeing the desired behavior, but we don't get that in <input>, etc.