Skip to content

fix(material/dialog): prevent content scroll from getting stuck on iOS - #34196

Open
Glob111 wants to merge 1 commit into
angular:mainfrom
Glob111:fix/dialog-ios-overscroll
Open

Glob111 wants to merge 1 commit into
angular:mainfrom
Glob111:fix/dialog-ios-overscroll

Conversation

@Glob111

@Glob111 Glob111 commented Nov 28, 2026

Copy link
Copy Markdown

I ran into this on iOS: if you swipe past the top or bottom of the dialog content and then swipe back right away, nothing moves. Adding overscroll-behavior: contain fixed it for me.

One side effect: scrolling no longer chains from the dialog content to outer containers. I think that's fine for a dialog, but let me know if you disagree.

I only tested it in the iOS Simulator (iPhone 17, iOS 27.2), not on a real device. It got stuck every time I tried without the change (3 attempts) and scrolled every time with it (4 attempts). Chromium unit tests pass. Firefox doesn't launch on my machine, with or without the change. I didn't add a test, since the unit test browsers can't reproduce the native iOS gesture.

Swiping past the edge of the dialog content and then immediately swiping back
leaves the content unresponsive. Contain the overscroll within the content.

Fixes angular#15995
@Glob111
Glob111 marked this pull request as ready for review November 28, 2026 16:27
@pullapprove
pullapprove Bot requested review from crisbeto and tjshiu November 28, 2026 16:27

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant