Summary: Can't select main frame after refreshing page. Steps to Reproduce: 1. Inspect webkit.org 2. Open Resource tab 3. In the sidebar, select a child of the main resource 4. Reload page 5. The child should be re-selected after reload 6. Try to select the main resource using the mouse => Cannot click to select Note: Hitting the up arrow key to select the main resource from the child works fine.
<rdar://problem/47805023>
Regressed in https://trac.webkit.org/changeset/240947.
Created attachment 361142 [details] Patch
(In reply to Matt Baker from comment #2) > Regressed in https://trac.webkit.org/changeset/240947. This patch actually just allowed the bug to manifest. It was a defect lurking in TreeOutline from before this change was made.
Comment on attachment 361142 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=361142&action=review r-, can you write some sort of test for this? I think we've long passed the point where we need regression tests for our common UI classes. > Source/WebInspectorUI/UserInterface/Views/TreeOutline.js:825 > + const omitFocus = true; This doesn't seem right. If we try to select a `WI.TreeElement` via `_handleMouseDown`, we'd never focus the parent. Either provide a justification for this, or maybe be a bit more "limiting" (e.g. only `omitFocus` when there is more than one `selectedItems`).
Comment on attachment 361142 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=361142&action=review >> Source/WebInspectorUI/UserInterface/Views/TreeOutline.js:825 >> + const omitFocus = true; > > This doesn't seem right. If we try to select a `WI.TreeElement` via `_handleMouseDown`, we'd never focus the parent. Either provide a justification for this, or maybe be a bit more "limiting" (e.g. only `omitFocus` when there is more than one `selectedItems`). Actually that's not the case. The tree receives the focus by virtue of being clicked; the awful `omitFocus` flag is only for forcing the focus when selecting elements programmatically.
(In reply to Devin Rousso from comment #5) > Comment on attachment 361142 [details] > Patch > > View in context: > https://bugs.webkit.org/attachment.cgi?id=361142&action=review > > r-, can you write some sort of test for this? I think we've long passed the > point where we need regression tests for our common UI classes. Added a comment to https://bugs.webkit.org/show_bug.cgi?id=192044.
Comment on attachment 361142 [details] Patch rs=me, please don't forget to write tests :)
Comment on attachment 361142 [details] Patch Clearing flags on attachment: 361142 Committed r240997: <https://trac.webkit.org/changeset/240997>
All reviewed patches have been landed. Closing bug.