Summary: | Web Inspector: Keyboard shortcut for "Inspect Element" only works when Web Inspector is open. | ||||||||
---|---|---|---|---|---|---|---|---|---|
Product: | WebKit | Reporter: | Nick Sergeant <nick> | ||||||
Component: | Web Inspector | Assignee: | Nobody <webkit-unassigned> | ||||||
Status: | RESOLVED FIXED | ||||||||
Severity: | Normal | CC: | bburg, chrisjshull, joepeck, pmuellr, timothy, webkit-bug-importer | ||||||
Priority: | P2 | Keywords: | InRadar | ||||||
Version: | 528+ (Nightly build) | ||||||||
Hardware: | All | ||||||||
OS: | All | ||||||||
Attachments: |
|
Description
Nick Sergeant
2013-03-01 10:38:07 PST
Why was this marked as invalid? It's marked INVALID because it's not a WebKit bug. This is something the user agent (i.e., Safari) would have to implement. WebKit has no control over browser-level keybindings, as they are separate from the Inspector's window. Feel free to file a bug report at bugreport.apple.com. I'm a bit puzzled, though. What's the point of using this shortcut (Cmd-Shift-C) when the web content is focused instead of the inspector? You can just right click "Inspect Element" anywhere, and then select a node using the tree or the existing shortcut. Is it just for the element highlighting? > This is something the user agent (i.e., Safari) would have to implement. WebKit has no control over browser-level keybindings, as they are separate from the Inspector's window. Feel free to file a bug report at bugreport.apple.com. Ah, okay. > I'm a bit puzzled, though. What's the point of using this shortcut (Cmd-Shift-C) when the web content is focused instead of the inspector? You can just right click "Inspect Element" anywhere, and then select a node using the tree or the existing shortcut. Is it just for the element highlighting? As a developer I spend a bunch of time going from "looking at a page" to "I need to inspect this element". With Chrome, I can hit the keyboard shortcut, and it'll immediately invoke the "Inspect Element" function and bring up the inspector. Yes, I could use my mouse, but I'm a keyboard-oriented developer and I know many others are as well. (In reply to comment #4) > > As a developer I spend a bunch of time going from "looking at a page" to "I > need to inspect this element". With Chrome, I can hit the keyboard shortcut, > and it'll immediately invoke the "Inspect Element" function and bring up the > inspector. Yes, I could use my mouse, but I'm a keyboard-oriented developer > and I know many others are as well. Ah, I see. There are plenty of small bugs that make keyboard navigation difficult in the WebKit Web Inspector. The issues are often related to accessibility problems as well. If you are interested in helping to report or fix some of these issues, I'd be happy to point you in the right direction. Sorry that this one is out of our scope though. Thanks, Brian! Unfortunately I no longer use Safari for development so I probably wouldn't be able to help out much, but if I ever do switch back, I will definitely consider helping out. (In reply to comment #1) > <rdar://problem/13325889> This report has been forwarded to the appropriate team. You don't have to do anything. This will likely need WebKit changes too, so reopening this bug. Created attachment 276215 [details]
[PATCH] Proposed Fix
I couldn't think of a better name then "PointToInspect". The UI can show something different. We also call this "SearchingForNode" in some cases. Comment on attachment 276215 [details] [PATCH] Proposed Fix View in context: https://bugs.webkit.org/attachment.cgi?id=276215&action=review > Source/WebKit2/WebProcess/WebPage/WebInspector.cpp:226 > + m_page->corePage()->inspectorController().show(); Why show in the disable case? (In reply to comment #11) > Comment on attachment 276215 [details] > [PATCH] Proposed Fix > > View in context: > https://bugs.webkit.org/attachment.cgi?id=276215&action=review > > > Source/WebKit2/WebProcess/WebPage/WebInspector.cpp:226 > > + m_page->corePage()->inspectorController().show(); > > Why show in the disable case? This is basically a bring to front, but that actually should happen automatically if the user selected something, so I should be able to drop it here! Comment on attachment 276215 [details] [PATCH] Proposed Fix View in context: https://bugs.webkit.org/attachment.cgi?id=276215&action=review > Source/WebKit2/UIProcess/API/C/WKInspector.cpp:130 > + toImpl(inspectorRef)->togglePointToInspect(); I would prefer a simple isPointToInspectEnabled / setPointToInspectEnabled pair rather than having toggle. That way a client doesn't have to double-check every time if they want to unconditionally enable it. > Source/WebKit2/WebProcess/WebPage/WebInspectorUI.messages.in:39 > + EnablePointToInspect() Can this just be one message, SetPointToInspectEnabled? Created attachment 276259 [details]
[PATCH] Improved Version
This changes the workflow.
Now when Toggle happens in the UIProcess:
- if starting, connect() so the inspector doesn't open until you select something
- if closing, we can do nothing if nothing was selected. If something was selected, the inspector will bring to front automatically anyways
|