Skip to content

Commit

Permalink
Editor: No need to reset mode when changing device preview types
Browse files Browse the repository at this point in the history
  • Loading branch information
Mamaduka committed Oct 20, 2024
1 parent 413bf9b commit 3b8f2db
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 3b8f2db

Please sign in to comment.