mirror of
https://github.com/fork-maintainers/iceraven-browser
synced 2024-11-17 15:26:23 +00:00
[fenix] For https://github.com/mozilla-mobile/fenix/issues/16592 - Fix missing collection snackbar for a11y (https://github.com/mozilla-mobile/fenix/pull/16593)
Set null anchor for snackbar when using a11y services
This commit is contained in:
parent
47071ea018
commit
8556ebe1fe
@ -72,14 +72,18 @@ class TabTrayDialogFragment : AppCompatDialogFragment(), UserInteractionHandler
|
|||||||
private lateinit var tabTrayDialogStore: TabTrayDialogFragmentStore
|
private lateinit var tabTrayDialogStore: TabTrayDialogFragmentStore
|
||||||
|
|
||||||
private val snackbarAnchor: View?
|
private val snackbarAnchor: View?
|
||||||
get() = if (tabTrayView.fabView.new_tab_button.isVisible ||
|
get() =
|
||||||
tabTrayView.mode != Mode.Normal
|
// Fab is hidden when Talkback is activated. See #16592
|
||||||
) tabTrayView.fabView.new_tab_button
|
if (requireContext().settings().accessibilityServicesEnabled) null
|
||||||
/* During selection of the tabs to the collection, the FAB is not visible,
|
else if (tabTrayView.fabView.new_tab_button.isVisible ||
|
||||||
which leads to not attaching a needed AnchorView. That's why, we're not only checking, if it's not visible,
|
tabTrayView.mode != Mode.Normal
|
||||||
but also if we're not in a "Normal" mode, so after selecting tabs for a collection, we're pushing snackbar
|
) tabTrayView.fabView.new_tab_button
|
||||||
above the FAB, as we're switching from "Multiselect" to "Normal". */
|
/* During selection of the tabs to the collection, the FAB is not visible,
|
||||||
else null
|
which leads to not attaching a needed AnchorView. That's why, we're not only
|
||||||
|
checking, if it's not visible, but also if we're not in a "Normal" mode, so after
|
||||||
|
selecting tabs for a collection, we're pushing snackbar
|
||||||
|
above the FAB, as we're switching from "Multiselect" to "Normal". */
|
||||||
|
else null
|
||||||
|
|
||||||
private val collectionStorageObserver = object : TabCollectionStorage.Observer {
|
private val collectionStorageObserver = object : TabCollectionStorage.Observer {
|
||||||
override fun onCollectionCreated(title: String, sessions: List<Session>) {
|
override fun onCollectionCreated(title: String, sessions: List<Session>) {
|
||||||
|
Loading…
Reference in New Issue
Block a user