fix: Anchor context-menu snackbars above the browser toolbar - #4521
Open
mvanhorn wants to merge 1 commit into
Open
fix: Anchor context-menu snackbars above the browser toolbar#4521mvanhorn wants to merge 1 commit into
mvanhorn wants to merge 1 commit into
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Pass the existing browser toolbar from
BaseBrowserFragmentintoContextMenuIntegrationalongside the current parent view. Configure the production snackbar delegate used by link context-menu candidates to anchor each snackbar to that toolbar before display, while retaining the coordinator root as the snackbar's parent and preserving all candidate behavior. The Material snackbar anchor should then track the toolbar asImeInsetsSynchronizerchanges its position, keeping one consistent separation above the toolbar without independently applying the keyboard height.Context-menu actions such as opening a link in a new tab display a snackbar from the browser fragment's coordinator root. Because the browser toolbar is a separate bottom-aligned view whose margins move during IME transitions, the snackbar can overlap the toolbar before the keyboard opens and retain roughly a keyboard-height gap after it opens. The issue provides a reproducible link-context-menu and keyboard sequence and identifies the IME behavior introduced around PR #3680. No prior or competing pull request is present in the supplied issue timeline.
Open a link in a new tab with the keyboard hidden and verify the snackbar is immediately above the bottom toolbar rather than overlapping it on the Z axis.
While that snackbar remains visible, focus the browser toolbar to show the IME and verify the snackbar remains directly above the moved toolbar with only the intended Material spacing, not an additional keyboard-height gap.
Dismiss the keyboard and verify the snackbar/toolbar relationship returns to the bottom of the visible browser area without stale margins or overlap.
Exercise the snackbar's existing
SWITCHaction and confirm it still selects the newly opened tab, proving that anchoring does not alter context-menu behavior.Pull Request checklist
Fixes #3746