Bug 33449 - REGRESSION: Inspect Element selects the wrong element
Summary: REGRESSION: Inspect Element selects the wrong element
Alias: None
Product: WebKit
Classification: Unclassified
Component: Web Inspector (Deprecated) (show other bugs)
Version: 528+ (Nightly build)
Hardware: All All
: P2 Normal
Assignee: Pavel Feldman
Depends on:
Reported: 2010-01-10 08:24 PST by Ain Tohvri
Modified: 2010-01-10 13:31 PST (History)
7 users (show)

See Also:

[PATCH] Proposed fix (2.10 KB, patch)
2010-01-10 11:48 PST, Pavel Feldman
timothy: review+
Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Ain Tohvri 2010-01-10 08:24:42 PST
Steps to reproduce:

1. Close Web Inspector
2. Go to http://www.bbc.co.uk/ for instance
3. Select a word
4. Right-click a selection and select Inspect Element

Inspector window appears with body element selected, not the element selection was in. 

NB! It works properly on the 2nd try.

It might be related to another report: https://bugs.webkit.org/show_bug.cgi?id=22511
Comment 1 Timothy Hatcher 2010-01-10 09:01:20 PST
This seems to be a regression related to Pavel's change to select the previous selected node on reload.

I see the Inspector select and reveal the "Inspect Element" node breifly then it jumps to the previous selected node. In the reporters case it was <body>. But I was reproducing this with a random element on the BBC's page.
Comment 2 Timothy Hatcher 2010-01-10 09:03:33 PST
Note: I was closing the Inspector each time. Making it happen every time.

The reporter kept the Inspector open, that is why it worked the second time.
Comment 3 Pavel Feldman 2010-01-10 11:48:31 PST
Created attachment 46238 [details]
[PATCH] Proposed fix
Comment 4 Pavel Feldman 2010-01-10 13:31:09 PST
Committing to http://svn.webkit.org/repository/webkit/trunk ...
	M	WebCore/ChangeLog
	M	WebCore/inspector/front-end/ElementsPanel.js
	M	WebCore/inspector/front-end/treeoutline.js
Committed r53053