Web Inspector: ⌥⌘C sometimes ends ups up opening inspector without console prompt...
authorcommit-queue@webkit.org <commit-queue@webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Thu, 5 Nov 2015 19:35:22 +0000 (19:35 +0000)
committercommit-queue@webkit.org <commit-queue@webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Thu, 5 Nov 2015 19:35:22 +0000 (19:35 +0000)
commite08664ab6397124c3b61534fe96e32d79c29ce41
tree8942f817fbfaae1d40acc7e78c5b0c7a87399ca0
parent40881018241835d69f8010b3f245b0cef299e88b
Web Inspector: ⌥⌘C sometimes ends ups up opening inspector without console prompt focused
https://bugs.webkit.org/show_bug.cgi?id=150916

Patch by Joseph Pecoraro <pecoraro@apple.com> on 2015-11-05
Reviewed by Timothy Hatcher.

When first opening the inspector we hide the window until the document
is mostly ready / loaded. However once displaying the window WK2 would
set the initial focus, clearing what we already had and focusing the
first natural element (tabindex dictates the toolbar). Workaround this
by detecting when the document becomes visible and then focusing the
console prompt.

* UserInterface/Protocol/InspectorFrontendAPI.js:
(InspectorFrontendAPI.showConsole):
(InspectorFrontendAPI.handleEvent):

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@192065 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Source/WebInspectorUI/ChangeLog
Source/WebInspectorUI/UserInterface/Protocol/InspectorFrontendAPI.js