You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The value of getPostEdits (wp.data.select('core/editor').getPostEdits()) would be empty until post save or unless the EditFlow status dropdown has changed.
Actual Behavior
After creating a new post, because of how the code changing the custom status
is subscribed we immediately have a post edit (wp.data.select( 'core' ).getEntityRecordNonTransientEdits('postType', POST_TYPE, POST_ID )) which means that even if no changes were made when trying to leave the post or close the tab we are met with the "Leave site? Changes you made may not be saved." which is very confusing for editors.
Steps to Reproduce the Problem
Create post. Do nothing.
Attempt to close the tab or leave the page.
Confirm that the "Leave site?" alert is present.
(Optional) Additional notes
The solution may be to, if nothing has changed in the dropdown, add the default in PHP on post save (rest_pre_insert_${post_type} or on the save_post hook).
The text was updated successfully, but these errors were encountered:
Expected/Desired Behavior
Fill with either one:
The value of
getPostEdits
(wp.data.select('core/editor').getPostEdits()
) would be empty until post save or unless the EditFlow status dropdown has changed.Actual Behavior
After creating a new post, because of how the code changing the custom status
Edit-Flow/blocks/src/custom-status/block.js
Lines 20 to 42 in 2e07a1b
wp.data.select( 'core' ).getEntityRecordNonTransientEdits('postType', POST_TYPE, POST_ID )
) which means that even if no changes were made when trying to leave the post or close the tab we are met with the "Leave site? Changes you made may not be saved." which is very confusing for editors.Steps to Reproduce the Problem
(Optional) Additional notes
The solution may be to, if nothing has changed in the dropdown, add the default in PHP on post save (
rest_pre_insert_${post_type}
or on thesave_post
hook).The text was updated successfully, but these errors were encountered: