Bug 145446
| Summary: | Web Inspector: Last selected DOM node loses focus after reload | ||
|---|---|---|---|
| Product: | WebKit | Reporter: | Matt Baker <mattbaker> |
| Component: | Web Inspector | Assignee: | Nobody <webkit-unassigned> |
| Status: | RESOLVED WORKSFORME | ||
| Severity: | Normal | CC: | bburg, hi, inspector-bugzilla-changes, jonowells, webkit-bug-importer |
| Priority: | P2 | Keywords: | InRadar |
| Version: | 528+ (Nightly build) | ||
| Hardware: | All | ||
| OS: | All | ||
| Bug Depends on: | 144231 | ||
| Bug Blocks: | |||
Matt Baker
* SUMMARY
Last selected DOM node loses focus after reload. Node is correctly reselected in the DOM tree, but selection uses unfocused style (gray background).
* STEPS TO REPRODUCE
1. Inspect element
2. Elements tab shows selected and focused DOM node.
3. Reload page.
=> Node is reselected but not focused. Quick console has the focus.
* NOTES
Occurred during move to tab UI:
http://trac.webkit.org/log/trunk/?rev=183335&stop_rev=183323
| Attachments | ||
|---|---|---|
| Add attachment proposed patch, testcase, etc. |
Radar WebKit Bug Importer
<rdar://problem/21149327>
Matt Baker
This isn't a regression after all. When the navigation sidebar is visible in the Elements tab, the previously selected item in the tree outline is restored on page reload, stealing the focus from the console prompt.
By the time the previously selected DOM node is restored, the prompt no longer has the focus, and the selected node can be given the focus instead:
DOMTreeContentView.js: 340: selectAndRevealDOMNode(nodeToFocus, WebInspector.isConsoleFocused());
When the navigation sidebar is closed the prompt is never blurred.
Matt Baker
(In reply to comment #2)
> This isn't a regression after all. When the navigation sidebar is visible in
> the Elements tab, the previously selected item in the tree outline is
> restored on page reload, stealing the focus from the console prompt.
This scenario could only occur prior to the tab UI, when viewing the DOM tree for a resource. As the Elements tab lacks a navigation sidebar, the focus will always be set to the console prompt after reloading the page.
Maybe we should persist the focus state of the console prompt. If the prompt had the focus prior to reloading the page, the expectation is that the focus will be restored after the view refreshes.
Devin Rousso
Is this still an issue? It seems to be working fine for me.