tor-browser

The Tor Browser
git clone https://git.dasho.dev/tor-browser.git
Log | Files | Refs | README | LICENSE

commit de8aca3bd6a0c057f2c39ca7abead33812b24f1e
parent a09cc08c820eaa310d0dd83d252d5dadb992a3a6
Author: Mugurell <Mugurell@users.noreply.github.com>
Date:   Mon,  8 Dec 2025 13:26:12 +0000

Bug 1998404 - Ignore URL fragment changes for closing the find in page UX r=android-reviewers,moyin

The "#" separator is already a reserved character for separating url fragments
and we can easily use it for cleaning the URL that is observed for knowing when
the user actually navigates away to a different website.

Differential Revision: https://phabricator.services.mozilla.com/D275416

Diffstat:
Mmobile/android/fenix/app/src/main/java/org/mozilla/fenix/browser/BaseBrowserFragment.kt | 3++-
1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/mobile/android/fenix/app/src/main/java/org/mozilla/fenix/browser/BaseBrowserFragment.kt b/mobile/android/fenix/app/src/main/java/org/mozilla/fenix/browser/BaseBrowserFragment.kt @@ -1650,7 +1650,8 @@ abstract class BaseBrowserFragment : state.findCustomTabOrSelectedTab(customTabSessionId) } .ifAnyChanged { tab -> - arrayOf(tab.content.url, tab.content.loadRequest) + val urlWithoutFragment = tab.content.url.substringBefore("#") + arrayOf(urlWithoutFragment, tab.content.loadRequest) } .collect { findInPageIntegration.onBackPressed()