Prevents the default closing flow and sends a message to the parent frame to
perform the navigation on the client side.

@param {MessagePort} calypsoPort Port used for communication with parent frame.
function handleGoToAllPosts( calypsoPort ) {
	$( '#editor' ).on( 'click', '.edit-post-fullscreen-mode-close__toolbar a', e => {
		e.preventDefault();
		calypsoPort.postMessage( {
			action: 'goToAllPosts',
			payload: {
				unsavedChanges: select( 'core/editor' ).isEditedPostDirty(),
			},
		} );
	} );
}