mirror of
https://github.com/fork-maintainers/iceraven-browser
synced 2024-11-19 09:25:34 +00:00
[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)
This commit is contained in:
parent
7a44428d56
commit
5bdc6653a4
@ -690,13 +690,11 @@ class BrowserFragment : Fragment(), BackHandler, CoroutineScope,
|
|||||||
// Stop toolbar from collapsing if TalkBack is enabled or page is loading
|
// Stop toolbar from collapsing if TalkBack is enabled or page is loading
|
||||||
val accessibilityManager = context
|
val accessibilityManager = context
|
||||||
?.getSystemService(Context.ACCESSIBILITY_SERVICE) as? AccessibilityManager
|
?.getSystemService(Context.ACCESSIBILITY_SERVICE) as? AccessibilityManager
|
||||||
if (accessibilityManager?.isTouchExplorationEnabled == false) {
|
if (loading || accessibilityManager?.isTouchExplorationEnabled == true) {
|
||||||
if (!loading) {
|
(behavior as? BrowserToolbarBottomBehavior)?.forceExpand(toolbarView)
|
||||||
behavior = BrowserToolbarBottomBehavior(context, null)
|
behavior = null
|
||||||
} else {
|
} else {
|
||||||
(behavior as? BrowserToolbarBottomBehavior)?.forceExpand(toolbarView)
|
behavior = BrowserToolbarBottomBehavior(context, null)
|
||||||
behavior = null
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user