radix-ui / primitives

Radix Primitives is an open-source UI component library for building high-quality, accessible design systems and web apps. Maintained by @workos.
https://radix-ui.com/primitives
MIT License
15.83k stars 821 forks source link

[Dialog] Height "jumps" at bottom on scroll when Safari address bar animates on iPhone X+ and iOS 15+ #3078

Open just-learning-1 opened 2 years ago

just-learning-1 commented 2 years ago

Bug report

Current Behavior

  1. Visit this page in Safari on an iPhone X+ running iOS 15+
  2. Tap the button on the page to open the Radix UI Dialog, then scroll up and down, and observe the bottom as the Safari address bar height animates
  3. Observed: Height of the dialog "jumps" at the bottom as the Safari address bar height shrinks down during a swipe up. That is, content beneath the dialog becomes visible during the address bar animation, when it should not be.4.

Notes:

Expected behavior

Ultimately, for the full screen Dialog to never reveal the content beneath it.

Reproducible example

Visit this page in Safari on an iPhone X+ running iOS 15+

Suggested solution

Your environment

Software Name(s) Version
Radix Package(s) @radix-ui/react-dialog 0.1.7 and 0.1.8-rc.45
React n/a 17.0.2
Browser Safari iOS 15.1 and 15.5 on iPhone 13 Pro Max
Assistive tech
Node n/a
npm/yarn
Operating System iOS 15.1 and 15.5 on iPhone 13 Pro Max
ItzaMi commented 2 years ago

@benoitgrelard , I don't think that this issue belongs to the website. The user presented their own project while using the dialog. In their use case, opening the dialog removes the margin applied to body but seems to be detached from this repo

chaance commented 2 months ago

@ItzaMi Good callout, moved it back!