File tree Expand file tree Collapse file tree 2 files changed +8
-12
lines changed
src/browser/extension/inject Expand file tree Collapse file tree 2 files changed +8
-12
lines changed Original file line number Diff line number Diff line change @@ -45,15 +45,3 @@ if (typeof window.onbeforeunload !== 'undefined') {
4545 sendMessage ( { type : 'PAGE_UNLOADED' } ) ;
4646 } ;
4747}
48-
49- // Detect when the tab is reactivated
50- document . addEventListener ( 'visibilitychange' , function ( ) {
51- if ( ! isAllowed ( ) ) return ;
52- if ( document . visibilityState === 'visible' && payload ) {
53- sendMessage ( {
54- payload : payload ,
55- source : 'redux-page' ,
56- init : true
57- } ) ;
58- }
59- } , false ) ;
Original file line number Diff line number Diff line change @@ -107,6 +107,14 @@ window.devToolsExtension = function(next) {
107107 }
108108 return true ;
109109 } ) ;
110+
111+ // Detect when the tab is reactivated
112+ document . addEventListener ( 'visibilitychange' , function ( ) {
113+ if ( document . visibilityState === 'visible' ) {
114+ shouldInit = true ;
115+ relay ( 'STATE' , store . liftedStore . getState ( ) ) ;
116+ }
117+ } , false ) ;
110118 }
111119
112120 if ( next ) {
You can’t perform that action at this time.
0 commit comments