@@ -562,12 +562,18 @@ cls.NetworkLogView = function(id, name, container_class, html, default_handler,
562562 }
563563 } . bind ( this ) ;
564564
565- this . _clear_selected = function ( message )
565+ this . _view_hidden_bound = function ( message )
566566 {
567- this . selected = null ;
568- this . needs_instant_update = true ;
569- this . update ( ) ;
570- } ;
567+ if ( message . id != "network-detail-overlay" )
568+ return ;
569+
570+ if ( ! this . _overlay . is_active )
571+ {
572+ this . selected = null ;
573+ this . needs_instant_update = true ;
574+ this . update ( ) ;
575+ }
576+ } . bind ( this ) ;
571577
572578 var eh = window . eventHandlers ;
573579
@@ -584,6 +590,7 @@ cls.NetworkLogView = function(id, name, container_class, html, default_handler,
584590 messages . addListener ( "setting-changed" , this . _on_setting_changed_bound ) ;
585591 messages . addListener ( "network-resource-updated" , this . update . bind ( this ) ) ;
586592 messages . addListener ( "network-context-cleared" , this . update . bind ( this ) ) ;
593+ messages . addListener ( "hide-view" , this . _view_hidden_bound ) ;
587594 eh . click [ "select-network-viewmode" ] = this . _on_select_network_viewmode_bound ;
588595 eh . click [ "type-filter-network-view" ] = this . _on_change_type_filter_bound ;
589596 eh . click [ "profiler-mode-switch" ] = this . _on_toggle_network_profiler_bound ;
@@ -606,7 +613,6 @@ cls.NetworkLogView = function(id, name, container_class, html, default_handler,
606613 ] ) ;
607614
608615 this . _overlay = this . register_overlay ( new cls . NetworkDetailOverlayView ( "network-detail-overlay" , "network-details-view" ) ) ;
609- this . _overlay . addListener ( "hidden" , this . _clear_selected . bind ( this ) ) ;
610616 cls . NetworkDetailOverlayView . create_ui_widgets ( ) ;
611617
612618 this . _type_filters = [ "all" ] . map ( this . _map_filter_bound ) ;
0 commit comments