apps/wpcom-block-editor/src/calypso/iframe-bridge-server.js
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(),
			},
		} );
	} );
}
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(),
			},
		} );
	} );
}
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.