From 5bdc6653a4a6fe4a4790c46c7871083de8f4cf24 Mon Sep 17 00:00:00 2001 From: Emily Kager Date: Thu, 2 May 2019 14:28:57 -0700 Subject: [PATCH] [fenix] For https://github.com/mozilla-mobile/fenix/issues/2035 - Fixes a11y and loading toolbar behavior logic (https://github.com/mozilla-mobile/fenix/pull/2243) --- .../org/mozilla/fenix/browser/BrowserFragment.kt | 12 +++++------- 1 file changed, 5 insertions(+), 7 deletions(-) diff --git a/app/src/main/java/org/mozilla/fenix/browser/BrowserFragment.kt b/app/src/main/java/org/mozilla/fenix/browser/BrowserFragment.kt index db99ea866d..cf9ef2363e 100644 --- a/app/src/main/java/org/mozilla/fenix/browser/BrowserFragment.kt +++ b/app/src/main/java/org/mozilla/fenix/browser/BrowserFragment.kt @@ -690,13 +690,11 @@ class BrowserFragment : Fragment(), BackHandler, CoroutineScope, // Stop toolbar from collapsing if TalkBack is enabled or page is loading val accessibilityManager = context ?.getSystemService(Context.ACCESSIBILITY_SERVICE) as? AccessibilityManager - if (accessibilityManager?.isTouchExplorationEnabled == false) { - if (!loading) { - behavior = BrowserToolbarBottomBehavior(context, null) - } else { - (behavior as? BrowserToolbarBottomBehavior)?.forceExpand(toolbarView) - behavior = null - } + if (loading || accessibilityManager?.isTouchExplorationEnabled == true) { + (behavior as? BrowserToolbarBottomBehavior)?.forceExpand(toolbarView) + behavior = null + } else { + behavior = BrowserToolbarBottomBehavior(context, null) } } }