fix(menu): improve reliability of main content not being scrollable when menu opens #28829
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.
Issue number: resolves #28399
What is the current behavior?
As part of #26976 I fixed an issue where
pointer-events: none
was not applied until after the menu open gesture finishes. This resolved a bug where scrolling was latching after the menu gesture starts.However, I did not account for the edge case where scrolling latches before
pointer-events: none
is applied in the DOM. Since scrolling has already latched thenpointer-events: none
does not change the scrolling behavior. This can happen if a user swipes up and to the right from the left edge of the screen.What is the new behavior?
overflow-y: hidden
is now applied to the scrollable content which will interrupt any scrolling when the menu is open.Does this introduce a breaking change?
Other information
Testing:
This bug fixes a timing issue where scrolling latches on the main content as the menu tries to open. As a result, I am unable to write reliable automated tests for this. Reviewers should perform the following test on iOS and Android physical devices:
src/components/menu/test/basic
.Scrolling on the main content should not happen if the menu opens.
Dev build:
7.6.5-dev.11705341148.1a550d3b