Hi there, if I have the inspector set to open at the bottom of the window and it is closed when I choose 'Inspect element' from the context menu after it is opened it always selects the body tag in the 'elements' pane instead of what was clicked. Workaround for now is to do the right click dance again as the second time seems to work more reliably. Still it is quite annoying and always takes some time to figure it out and gather that not the right thing was selected.
(In reply to comment #0) > Hi there, Could you please specify the browser name and version?
Created attachment 67037 [details] [patch] First iteration.
Ilya, is there an explanation to go with this patch?
1. Open any page 2. Right-click on any element, select "Inspect Element" 3. Web Inspector is opened but the <body> element (for HTML) is focused rather than the selected element 4. Inspect the Web Inspector. An error message is logged in the console. The regression was introduced in http://trac.webkit.org/changeset/66012 - focusNode() is invoked in InspectorController::populateScriptObjects() before the main document is set for the InspectorDOMAgent instance (which makes focusNode() bail out prematurely).
*** Bug 45464 has been marked as a duplicate of this bug. ***
As I wrote in the other bug. r=me if the explanation goes into the ChangeLog! =)
Committed r67185 M WebCore/ChangeLog M WebCore/inspector/InspectorController.cpp r67185 = 0e881294fa1aba4a75ffe861696dd21fa46f54a6 (refs/remotes/trunk)
http://trac.webkit.org/changeset/67185