Bug 33449

Summary: REGRESSION: Inspect Element selects the wrong element
Product: WebKit Reporter: Ain Tohvri <ain>
Component: Web Inspector (Deprecated)Assignee: Pavel Feldman <pfeldman>
Status: RESOLVED FIXED    
Severity: Normal CC: bweinstein, joepeck, keishi, pfeldman, pmuellr, rik, timothy
Priority: P2    
Version: 528+ (Nightly build)   
Hardware: All   
OS: All   
Attachments:
Description Flags
[PATCH] Proposed fix timothy: review+

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