RESOLVED WORKSFORME 145446
Web Inspector: Last selected DOM node loses focus after reload
https://bugs.webkit.org/show_bug.cgi?id=145446
Summary Web Inspector: Last selected DOM node loses focus after reload
Matt Baker
Reported 2015-05-28 15:29:55 PDT
* 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
Radar WebKit Bug Importer
Comment 1 2015-05-28 15:30:07 PDT
Matt Baker
Comment 2 2015-05-28 20:09:33 PDT
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
Comment 3 2015-05-29 12:25:37 PDT
(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
Comment 4 2016-09-05 20:50:13 PDT
Is this still an issue? It seems to be working fine for me.
Note You need to log in before you can comment on or make changes to this bug.