Skip to content

Commit

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


Co-authored-by: Mamaduka <[email protected]>
Co-authored-by: draganescu <[email protected]>
  • Loading branch information
3 people authored Oct 21, 2024
1 parent a416596 commit 3b2b2ed
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

1 comment on commit 3b2b2ed

@github-actions
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Flaky tests detected in 3b2b2ed.
Some tests passed with failed attempts. The failures may not be related to this commit but are still reported for visibility. See the documentation for more information.

🔍 Workflow run URL: https://github.com/WordPress/gutenberg/actions/runs/11438157616
📝 Reported issues:

Please sign in to comment.