Bug 54858

Summary: Web Inspector: elementsPanel are flaky, at startup it selects <html> or <body> element depends on timing
Product: WebKit Reporter: Ilya Tikhonovsky <loislo>
Component: Web Inspector (Deprecated)Assignee: Ilya Tikhonovsky <loislo>
Status: RESOLVED WORKSFORME    
Severity: Normal CC: apavlov, bweinstein, joepeck, keishi, loislo, pfeldman, pmuellr, rik, rtakacs, yurys
Priority: P2    
Version: 528+ (Nightly build)   
Hardware: All   
OS: All   
Bug Depends on:    
Bug Blocks: 116924    
Attachments:
Description Flags
[patch] initial version pfeldman: review-

Ilya Tikhonovsky
Reported 2011-02-21 01:25:31 PST
the root of problem is setDocument call. Sometimes we have additional setDocument call forced by domContentLoaded event because inspector window was opened just before inspecting page. The first one was at didCommitLoad but with almost empty DOM tree. In that case elementsPanel automatically selects documentRoot element at the first call because there are no other selectable elements in DOM tree. At the second call it selects the documentRoot again because it was selected before.
Attachments
[patch] initial version (2.89 KB, patch)
2011-02-21 01:30 PST, Ilya Tikhonovsky
pfeldman: review-
Ilya Tikhonovsky
Comment 1 2011-02-21 01:30:46 PST
Created attachment 83137 [details] [patch] initial version
Pavel Feldman
Comment 2 2011-02-21 02:29:26 PST
Comment on attachment 83137 [details] [patch] initial version View in context: https://bugs.webkit.org/attachment.cgi?id=83137&action=review > Source/WebCore/ChangeLog:5 > + Web Inspector: elementsPanel are flaky, at startup it selects <html> or <body> element depends on timing Elements panel is ... depending on the timing. > Source/WebCore/inspector/front-end/ElementsPanel.js:162 > + if (this.focusedDOMNode && !this._focusedNodeWasAutomaticallySelected) We should only restore selection upon domContentLoaded event instead.
Roland Takacs
Comment 3 2013-05-29 01:32:17 PDT
It works fine for me (at statup the body element is the one that's selected). I will close the bug if noone minds.
Note You need to log in before you can comment on or make changes to this bug.