Bug 148732 - Web Inspector: Reloading the page causes the inspector tab to switch back to "Resources" tab
Summary: Web Inspector: Reloading the page causes the inspector tab to switch back to ...
Alias: None
Product: WebKit
Classification: Unclassified
Component: Web Inspector (show other bugs)
Version: Safari 9
Hardware: All All
: P2 Normal
Assignee: Nobody
Keywords: InRadar
: 149213 (view as bug list)
Depends on:
Reported: 2015-09-02 18:09 PDT by Iraê
Modified: 2015-10-02 11:10 PDT (History)
9 users (show)

See Also:

My local storage db with a lot of WebInspector entries (936.00 KB, application/octet-stream)
2015-09-02 18:09 PDT, Iraê
no flags Details
[PATCH] Proposed Fix (2.71 KB, patch)
2015-09-24 21:57 PDT, Joseph Pecoraro
no flags Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Iraê 2015-09-02 18:09:25 PDT
Created attachment 260465 [details]
My local storage db with a lot of WebInspector entries

While using Safari 9 Beta on OS X El Captain, and inspecting a website, if I hit Commd+R to reload the page, it's always switching back to "Resources".

I've been told that my file__0.localstorage file might be useful for you guys to reproduce, so I will be attaching that.

This is happening 100% of the time consistently on any website that I inspect. (tested on search.yahoo.com and nytimes.com before submitting).
Comment 1 Radar WebKit Bug Importer 2015-09-02 18:10:47 PDT
Comment 2 Timothy Hatcher 2015-09-03 15:25:38 PDT
Comment 3 Timothy Hatcher 2015-09-17 10:16:55 PDT
I am pretty sure this regressed by http://trac.webkit.org/changeset/186466. Before that we didn't force tab siwtches unless there was a user action.
Comment 4 Timothy Hatcher 2015-09-17 10:17:56 PDT
*** Bug 149213 has been marked as a duplicate of this bug. ***
Comment 5 Joseph Pecoraro 2015-09-24 21:46:36 PDT
1. Inspect about:blank
2. Select any non-Inspector tab
3. Evaluate: "//# sourceURL=test.js" in the console to create an "Extra Script"
4. Reload
  => switches to Resources tab.

=> WebInspector.DebuggerManager.Event.ScriptsCleared event is fired
  => ResourceSidebarPanel._scriptsCleared
    => SpecialFolder.removeChild
      => removeChild does not suppress select, newly selected tree element gets select
        => showContentView switches tab
Comment 6 Joseph Pecoraro 2015-09-24 21:57:10 PDT
Created attachment 261912 [details]
[PATCH] Proposed Fix
Comment 7 WebKit Commit Bot 2015-09-25 10:51:49 PDT
Comment on attachment 261912 [details]
[PATCH] Proposed Fix

Clearing flags on attachment: 261912

Committed r190246: <http://trac.webkit.org/changeset/190246>
Comment 8 WebKit Commit Bot 2015-09-25 10:51:53 PDT
All reviewed patches have been landed.  Closing bug.
Comment 9 Timothy Hatcher 2015-10-02 11:10:05 PDT
This pretty much affects anyone with a Safari extension content script.