tor-browser

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

commit 92273b8c8f2847fd36d3716b0ea31523221111ab
parent d8967aaa23762fe8f261c71cecdef029237e0e04
Author: Mugurell <Mugurell@users.noreply.github.com>
Date:   Thu,  9 Oct 2025 16:12:36 +0000

Bug 1991328 - Defer toolbar EditText updates to the next frame r=android-reviewers,skhan

Speculative fix to fix a race between Compose and the EditText used
to edit the current toolbar URL.
This ensures that all updates are managed by the View system without
interference from Jetpack Compose.

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

Diffstat:
Mmobile/android/android-components/components/compose/browser-toolbar/src/main/java/mozilla/components/compose/browser/toolbar/ui/InlineAutocompleteTextField.kt | 16+++++++++-------
1 file changed, 9 insertions(+), 7 deletions(-)

diff --git a/mobile/android/android-components/components/compose/browser-toolbar/src/main/java/mozilla/components/compose/browser/toolbar/ui/InlineAutocompleteTextField.kt b/mobile/android/android-components/components/compose/browser-toolbar/src/main/java/mozilla/components/compose/browser/toolbar/ui/InlineAutocompleteTextField.kt @@ -189,13 +189,15 @@ internal fun InlineAutocompleteTextField( }, modifier = modifier, update = { - if (query != it.originalText) { - it.updateText(query) - it.refreshAutocompleteSuggestions() - } - if (it.hint != hint) { - it.hint = hint - it.setHintTextColor(hintColor.toArgb()) + it.post { + if (query != it.originalText) { + it.updateText(query) + it.refreshAutocompleteSuggestions() + } + if (it.hint != hint) { + it.hint = hint + it.setHintTextColor(hintColor.toArgb()) + } } }, )