-
Notifications
You must be signed in to change notification settings - Fork 4.7k
Template activation: remove fake post type for registered templates #72674
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from 1 commit
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -734,7 +734,10 @@ export function updateEditorSettings( settings ) { | |
| export const setRenderingMode = | ||
| ( mode ) => | ||
| ( { dispatch, registry, select } ) => { | ||
| if ( select.__unstableIsEditorReady() ) { | ||
| if ( | ||
| select.__unstableIsEditorReady() && | ||
| ! select.getEditorSettings().isPreviewMode | ||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. @ellatrix: based on
Wouldn't that mean that it's worth still calling |
||
| ) { | ||
| // We clear the block selection but we also need to clear the selection from the core store. | ||
| registry.dispatch( blockEditorStore ).clearSelectedBlock(); | ||
| dispatch.editPost( { selection: undefined }, { undoIgnore: true } ); | ||
|
|
||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This should have been done in #72661 because it specifically handles the
templateproperty on a post object.