File tree Expand file tree Collapse file tree
packages/super-editor/src/editors/v1/core/presentation-editor Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -6020,6 +6020,8 @@ export class PresentationEditor extends EventEmitter {
60206020
60216021 if ( ! this . #editor) return false ;
60226022
6023+ let enteredHeaderFooter = false ;
6024+
60236025 try {
60246026 if ( story . storyType === 'headerFooterSlot' || story . storyType === 'headerFooterPart' ) {
60256027 const region = this . #findHeaderFooterRegionForStory( story ) ;
@@ -6028,6 +6030,7 @@ export class PresentationEditor extends EventEmitter {
60286030 this . #scrollPageIntoView( region . pageIndex ) ;
60296031 await this . #waitForPageMount( region . pageIndex , { timeout : PresentationEditor . ANCHOR_NAV_TIMEOUT_MS } ) ;
60306032 this . #activateHeaderFooterRegion( region ) ;
6033+ enteredHeaderFooter = true ;
60316034
60326035 const activeEditor = await this . #waitForHeaderFooterEditor( PresentationEditor . ANCHOR_NAV_TIMEOUT_MS ) ;
60336036 if ( ! activeEditor ?. commands ?. setTextSelection ) return false ;
@@ -6047,6 +6050,7 @@ export class PresentationEditor extends EventEmitter {
60476050 runtime . editor . view ?. focus ?.( ) ;
60486051 return true ;
60496052 } catch ( error ) {
6053+ if ( enteredHeaderFooter ) this . #exitHeaderFooterMode( ) ;
60506054 console . error ( '[PresentationEditor] navigateTo bookmark failed:' , error ) ;
60516055 this . emit ( 'error' , {
60526056 error,
You can’t perform that action at this time.
0 commit comments