@@ -49,18 +49,19 @@ export class BrowserEngine {
4949 loadUrl ( url : string ) : void {
5050 if ( ! url || url === 'about:newtab' ) { this . showNewtab ( ) ; return ; }
5151 const tabId = this . _activeTabId ; if ( ! tabId ) return ;
52- this . _showingNewtab = false ; this . _overlayActive = false ;
52+ this . _showingNewtab = false ;
5353 this . newtabPage . classList . remove ( 'active' ) ;
5454 setNavLoading ( true ) ; this . _navPending = true ; this . _lastUrl = '' ;
5555 this . urlbar . value = url ;
5656 const hist = this . hist . getOrCreate ( tabId ) ;
5757 if ( hist . navIdx < hist . navHistory . length - 1 ) hist . navHistory = hist . navHistory . slice ( 0 , hist . navIdx + 1 ) ;
5858 hist . navHistory . push ( url ) ; hist . navIdx = hist . navHistory . length - 1 ;
59- void this . updateBounds ( true ) ;
6059 if ( ! this . _created . has ( tabId ) ) {
6160 this . _created . add ( tabId ) ;
62- invoke < void > ( 'tab_webview_create' , { tabId, url } ) . catch ( err => { console . error ( '[Auralis]' , err ) ; setNavLoading ( false ) ; } ) ;
61+ // Le WebView est créé hors-écran ; updateBounds sera appelé depuis content-navigated
62+ invoke < void > ( 'tab_webview_create' , { tabId, url } ) . catch ( err => { console . error ( '[Auralis]' , err ) ; setNavLoading ( false ) ; this . _created . delete ( tabId ) ; } ) ;
6363 } else {
64+ void this . updateBounds ( true ) ;
6465 invoke < void > ( 'tab_webview_navigate' , { tabId, url } ) . catch ( err => { console . error ( '[Auralis]' , err ) ; setNavLoading ( false ) ; } ) ;
6566 }
6667 }
@@ -71,7 +72,7 @@ export class BrowserEngine {
7172 invoke < void > ( 'tab_webview_hide' , { tabId : prevId } ) . catch ( ( ) => { } ) ;
7273 this . _activeTabId = tabId ;
7374 if ( ! url || url === 'about:newtab' ) { this . showNewtab ( ) ; return ; }
74- this . _showingNewtab = false ; this . _overlayActive = false ;
75+ this . _showingNewtab = false ;
7576 this . newtabPage . classList . remove ( 'active' ) ; this . urlbar . value = url ;
7677 if ( this . _created . has ( tabId ) ) {
7778 void this . updateBounds ( true ) ;
@@ -81,8 +82,9 @@ export class BrowserEngine {
8182 setNavLoading ( true ) ; this . _navPending = true ; this . _lastUrl = '' ;
8283 const hist = this . hist . getOrCreate ( tabId ) ;
8384 if ( ! hist . navHistory . includes ( url ) ) { hist . navHistory . push ( url ) ; hist . navIdx = hist . navHistory . length - 1 ; }
84- void this . updateBounds ( true ) ; this . _created . add ( tabId ) ;
85- invoke < void > ( 'tab_webview_create' , { tabId, url } ) . catch ( err => { console . error ( '[Auralis]' , err ) ; setNavLoading ( false ) ; } ) ;
85+ this . _created . add ( tabId ) ;
86+ // Le WebView est créé hors-écran ; updateBounds sera appelé depuis content-navigated
87+ invoke < void > ( 'tab_webview_create' , { tabId, url } ) . catch ( err => { console . error ( '[Auralis]' , err ) ; setNavLoading ( false ) ; this . _created . delete ( tabId ) ; } ) ;
8688 }
8789 }
8890
0 commit comments