@@ -113,7 +113,7 @@ export default class PresentationCanvasExtension {
113113 const startNode = this . getStartNode ( canvas )
114114 if ( startNode ) canvas . setNodeData ( startNode , 'isStartNode' , false )
115115
116- canvas . setNodeData ( node , 'isStartNode' , true )
116+ if ( node !== startNode ) canvas . setNodeData ( node , 'isStartNode' , true )
117117 }
118118
119119 private getSlideSize ( ) : Size {
@@ -193,9 +193,25 @@ export default class PresentationCanvasExtension {
193193 }
194194 }
195195
196+ // Keep modals while in fullscreen mode
197+ const fullscreenModalObserver = new MutationObserver ( ( mutationRecords ) => {
198+ mutationRecords . forEach ( ( mutationRecord ) => {
199+ mutationRecord . addedNodes . forEach ( ( node ) => {
200+ document . body . removeChild ( node )
201+ document . fullscreenElement ?. appendChild ( node )
202+ } )
203+ } )
204+
205+ const inputField = document . querySelector ( ".prompt-input" ) as HTMLInputElement | null
206+ if ( inputField ) inputField . focus ( )
207+ } )
208+ fullscreenModalObserver . observe ( document . body , { childList : true } )
209+
196210 // Register event handler for exiting presentation mode
197211 canvas . wrapperEl . onfullscreenchange = ( _e : any ) => {
198212 if ( document . fullscreenElement ) return
213+
214+ fullscreenModalObserver . disconnect ( )
199215 this . endPresentation ( canvas )
200216 }
201217
0 commit comments