File tree Expand file tree Collapse file tree 1 file changed +3
-7
lines changed Expand file tree Collapse file tree 1 file changed +3
-7
lines changed Original file line number Diff line number Diff line change @@ -110,7 +110,7 @@ const md5 = require( 'md5' );
110
110
* @return boolean
111
111
*/
112
112
function isSiteEditor ( ) {
113
- return typeof pagenow === 'string' && pagenow === 'site-editor' ;
113
+ return document . querySelectorAll ( 'iframe[name="editor-canvas"]' ) . length > 0 ;
114
114
}
115
115
116
116
/**
@@ -758,9 +758,7 @@ const md5 = require( 'md5' );
758
758
759
759
if (
760
760
isBlockInQueryLoop ( clientId ) ||
761
- isSiteEditor ( ) ||
762
- isiFramedMobileDevicePreview ( ) ||
763
- isEditingTemplate ( )
761
+ isSiteEditor ( )
764
762
) {
765
763
restrictMode ( [ 'preview' ] ) ;
766
764
} else {
@@ -783,9 +781,7 @@ const md5 = require( 'md5' );
783
781
const blockType = getBlockType ( name ) ;
784
782
const forcePreview =
785
783
isBlockInQueryLoop ( clientId ) ||
786
- isSiteEditor ( ) ||
787
- isiFramedMobileDevicePreview ( ) ||
788
- isEditingTemplate ( ) ;
784
+ isSiteEditor ( ) ;
789
785
let { mode } = attributes ;
790
786
791
787
if ( forcePreview ) {
You can’t perform that action at this time.
0 commit comments