Skip to content

Commit

Permalink
Editor: No need to reset mode when changing device preview types (Wor…
Browse files Browse the repository at this point in the history
…dPress#66261)


Co-authored-by: Mamaduka <[email protected]>
Co-authored-by: draganescu <[email protected]>
  • Loading branch information
3 people authored and karthick-murugan committed Nov 13, 2024
1 parent 1048ad2 commit f680907
Showing 1 changed file with 0 additions and 2 deletions.
2 changes: 0 additions & 2 deletions packages/editor/src/components/preview-dropdown/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -46,12 +46,10 @@ export default function PreviewDropdown( { forceIsAutosaveable, disabled } ) {
};
}, [] );
const { setDeviceType } = useDispatch( editorStore );
const { __unstableSetEditorMode } = useDispatch( blockEditorStore );
const { resetZoomLevel } = unlock( useDispatch( blockEditorStore ) );

const handleDevicePreviewChange = ( newDeviceType ) => {
setDeviceType( newDeviceType );
__unstableSetEditorMode( 'edit' );
resetZoomLevel();
};

Expand Down

0 comments on commit f680907

Please sign in to comment.