Skip to content

Commit

Permalink
Enable device preview
Browse files Browse the repository at this point in the history
  • Loading branch information
ellatrix committed Apr 30, 2021
1 parent 886d158 commit 0b421dc
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 3 deletions.
7 changes: 5 additions & 2 deletions packages/edit-post/src/components/visual-editor/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,7 @@ function MaybeIframe( { children, contentRef, isTemplateMode, styles } ) {
head={ <EditorStyles styles={ styles } /> }
ref={ ref }
contentRef={ contentRef }
style={ { width: '100%', height: '100%' } }
style={ { width: '100%', height: '100%', display: 'block' } }
>
{ children }
</Iframe>
Expand Down Expand Up @@ -113,7 +113,10 @@ export default function VisualEditor( { styles } ) {
? templateModeStyles
: desktopCanvasStyles;
if ( resizedCanvasStyles ) {
animatedStyles = resizedCanvasStyles;
animatedStyles = {
...resizedCanvasStyles,
paddingBottom: null,
};
}

const contentRef = useMergeRefs( [
Expand Down
2 changes: 1 addition & 1 deletion packages/edit-post/src/store/selectors.js
Original file line number Diff line number Diff line change
Expand Up @@ -313,7 +313,7 @@ export function isSavingMetaBoxes( state ) {
* @return {string} Device type.
*/
export function __experimentalGetPreviewDeviceType( state ) {
return state.isEditingTemplate ? 'Desktop' : state.deviceType;
return state.deviceType;
}

/**
Expand Down

0 comments on commit 0b421dc

Please sign in to comment.