Bug 151530 - Web Inspector: Spacebar to toggle Timeline recording doesn't work in Timeline tab after reloading the page
Summary: Web Inspector: Spacebar to toggle Timeline recording doesn't work in Timeline...
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: Joseph Pecoraro
URL:
Keywords: InRadar
Depends on:
Blocks:
 
Reported: 2015-11-20 17:04 PST by Joseph Pecoraro
Modified: 2015-12-01 13:57 PST (History)
7 users (show)

See Also:


Attachments
[PATCH] Proposed Fix (2.06 KB, patch)
2015-11-20 17:11 PST, Joseph Pecoraro
timothy: review+
Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Joseph Pecoraro 2015-11-20 17:04:57 PST
* SUMMARY
Spacebar to toggle Timeline recording doesn't work in Timeline tab after reloading the page.

* STEPS TO REPRODUCE
1. Inspect this page
2. Show Timelines Tab
3. Cmd+R to reload the page
4. Spacebar to try to toggle start/stop recording
  => Doesn't work because quick console is focused and this is just inputing spaces

* NOTES
- Apparently we are focusing the QuickConsole as a result of clearing the log on reload
CONSOLE LOG CM.focus()
CONSOLE TRACE
0: focus(External/CodeMirror/codemirror.js:1357:22)
1: focus(External/CodeMirror/codemirror.js:4843:63)
2: focus(Views/ConsolePrompt.js:115:31)
3: clear(Controllers/JavaScriptLogViewController.js:84:26)
4: _logCleared(Views/LogContentView.js:643:38)
5: dispatch(Base/Object.js:155:55)
6: dispatchEventToListeners(Base/Object.js:162:17)
7: _delayedMessagesCleared(Controllers/LogManager.js:85:38)
8: _delayedMessagesCleared([native code])

- Apparently this means that if the inspected page does `console.clear` the inspector frontend will suddenly focus the Quick Console. lol!
- Some users might be used to a Reload focusing the console. We may need to tweak behavior.
Comment 1 Radar WebKit Bug Importer 2015-11-20 17:05:17 PST
<rdar://problem/23639291>
Comment 2 Joseph Pecoraro 2015-11-20 17:11:21 PST
Created attachment 266021 [details]
[PATCH] Proposed Fix

I haven't lived on this much yet. We may want to tweak this.

Some ideas:
- Maybe Clicking Console Nav Bar's Clear Log button should focus the console
- Maybe reload on tabs that support split content (WebInspector.doesCurrentTabSupportSplitContentBrowser()) should focus the console
Comment 3 Joseph Pecoraro 2015-12-01 13:57:00 PST
<http://trac.webkit.org/changeset/192908>