Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

When opening a dialog in a full-screen iOS PWA, the recent change to iOS scroll locking causes an unexplainable gap #1900

Closed
mehcode opened this issue Oct 4, 2022 · 2 comments · Fixed by #2100
Assignees

Comments

@mehcode
Copy link

mehcode commented Oct 4, 2022

What package within Headless UI are you using?

For example: @headlessui/vue

What version of that package are you using?

For example: v1.7.3

What browser are you using?

For example: Safari (iOS PWA Full Screen)

Reproduction URL

I can work on one if needed.

Describe your issue

When triggering a modal, HeadlessUI is setting position to fixed on <html>. For reasons I cannot understand, this triggers an unavoidable gap at the bottom of <html> between bottom: 0px; and the bottom of the screen.

The blue box is a div that is position: absolute; and bottom: 0px.

With html as position: fixed

image

With html as position: static

image

I've tried numerous things to try and remove the gap. The only thing that seems to work is set position: static !important; to <html> but that does also conflict with the scroll locking that HeadlessUI is trying to do.

I've confirmed that rolling back to v1.7.0 stops setting position: fixed on <html> which removes this issue.

@snappy316
Copy link

I'm noticing similar behavior - in my instance, I'm using @headlessui/react to put a Dialog over a Mapbox map. In v1.7.1 and later, the added position: fixed on <html> from #1830 stomps on most of my map display, as shown here:

v1.7.0 v1.7.1 and later
Screen Shot 2022-11-17 at 21 17 36 Screen Shot 2022-11-17 at 21 19 33
Map still visible under the backdrop Map is not visible (with 0 height) under the backdrop

I'm also more than happy to get a basic reproduction code snippet extracted if it would help!

@RobinMalfait
Copy link
Collaborator

Hey! Thank you for your bug report!
Much appreciated! 🙏

This should be fixed by #2100, and will be available in the next release.

You can already try it using:

  • npm install @headlessui/react@insiders.
  • npm install @headlessui/vue@insiders.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants