In [FenixBrowserUseCases.kt#121-128](https://searchfox.org/mozilla-central/rev/b731af0459d1aaa9bd1a2227c0fe3bc188c664ae/mobile/android/fenix/app/src/main/java/org/mozilla/fenix/components/usecases/FenixBrowserUseCases.kt#121-128), we initially did not start loading the "about:home" URL to prevent loading an invalid URL since "about:home" was not a real about page. Now that we introduced an "about:home" page that can be loaded in Bug 1962312, we should set `startLoading` to true to prevent the browser engine from linking the session later when we opening another page. When an engine session is linked to a tab via the `LinkingMiddleware`, it will start loading "about:home" which was previously not loaded before navigating to the another URL from the homepage. As "about:home" is loaded, the request will be intercepted by the [AppRequestInterceptor](https://searchfox.org/mozilla-central/rev/b731af0459d1aaa9bd1a2227c0fe3bc188c664ae/mobile/android/fenix/app/src/main/java/org/mozilla/fenix/AppRequestInterceptor.kt#96) and then navigated back to the homepage even though the user was already on the homepage. STR: - Open a new tab. - On the homepage, select a top site. Actual: - When trying to load the selected top site, it might navigate back to the homepage if the engine session has not been linked to the tab.
Bug 1974282 Comment 0 Edit History
Note: The actual edited comment in the bug view page will always show the original commenter’s name and original timestamp.
In [FenixBrowserUseCases.kt#121-128](https://searchfox.org/mozilla-central/rev/b731af0459d1aaa9bd1a2227c0fe3bc188c664ae/mobile/android/fenix/app/src/main/java/org/mozilla/fenix/components/usecases/FenixBrowserUseCases.kt#121-128), we initially did not start loading the "about:home" URL to prevent loading an invalid URL since "about:home" was not a real about page. Now that we introduced an "about:home" page that can be loaded in Bug 1962312, we should set `startLoading` to true to prevent the browser engine from linking the session later when we opening another page. When an engine session is being linked to a tab via the `LinkingMiddleware`, it will start loading "about:home" which was previously not loaded before navigating to the another URL from the homepage. As "about:home" is loaded, the request will be intercepted by the [AppRequestInterceptor](https://searchfox.org/mozilla-central/rev/b731af0459d1aaa9bd1a2227c0fe3bc188c664ae/mobile/android/fenix/app/src/main/java/org/mozilla/fenix/AppRequestInterceptor.kt#96) and then navigated back to the homepage even though the user was already on the homepage. STR: - Open a new tab. - On the homepage, select a top site. Actual: - When trying to load the selected top site, it might navigate back to the homepage if the engine session has not been linked to the tab.