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.
Occurred during move to tab UI:
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.
(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.
Is this still an issue? It seems to be working fine for me.