RESOLVED FIXED 45374
Web Inspector: Selecting "Inspect Element" always shows <body> instead of the inspected element
https://bugs.webkit.org/show_bug.cgi?id=45374
Summary Web Inspector: Selecting "Inspect Element" always shows <body> instead of the...
Martin Häcker
Reported 2010-09-08 02:06:15 PDT
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.
Attachments
[patch] First iteration. (1.52 KB, patch)
2010-09-09 08:20 PDT, Ilya Tikhonovsky
joepeck: review+
joepeck: commit-queue-
Ilya Tikhonovsky
Comment 1 2010-09-08 02:48:40 PDT
(In reply to comment #0) > Hi there, Could you please specify the browser name and version?
Ilya Tikhonovsky
Comment 2 2010-09-09 08:20:45 PDT
Created attachment 67037 [details] [patch] First iteration.
Joseph Pecoraro
Comment 3 2010-09-09 09:26:18 PDT
Ilya, is there an explanation to go with this patch?
Ilya Tikhonovsky
Comment 4 2010-09-09 09:52:18 PDT
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).
Ilya Tikhonovsky
Comment 5 2010-09-09 09:52:46 PDT
*** Bug 45464 has been marked as a duplicate of this bug. ***
Joseph Pecoraro
Comment 6 2010-09-09 09:55:00 PDT
As I wrote in the other bug. r=me if the explanation goes into the ChangeLog! =)
Ilya Tikhonovsky
Comment 7 2010-09-10 04:40:59 PDT
Committed r67185 M WebCore/ChangeLog M WebCore/inspector/InspectorController.cpp r67185 = 0e881294fa1aba4a75ffe861696dd21fa46f54a6 (refs/remotes/trunk)
Joseph Pecoraro
Comment 8 2010-09-10 09:47:32 PDT
Note You need to log in before you can comment on or make changes to this bug.