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

[Dialog] See under full screen when mobile Chrome address bar hides itself #10521

Closed
1 task done
djeeg opened this issue Mar 4, 2018 · 3 comments
Closed
1 task done
Labels
component: dialog This is the name of the generic UI component, not the React module! status: waiting for author Issue with insufficient information

Comments

@djeeg
Copy link
Contributor

djeeg commented Mar 4, 2018

  • I have searched the issues of this repository and believe that this is not a duplicate.

Expected Behavior

Content under the dialog should ideally not be visible when touch moving the dialog

Current Behavior

Using mobile Chrome, when I scroll the dialog up, I can see the content under the dialog

Steps to Reproduce (for bugs)

Steps to reproduce:

  1. Go here https://material-ui.com/demos/dialogs/
  2. Scroll down to "Full-screen dialogs" (address bar should be hidden by now)
  3. Scroll up a little bit, so the Chrome address bar shows
  4. Now open the dialog
  5. Note: Chrome address bar is showing
  6. Click and hold drag the dialog content up, notice that the address bar goes and you can see the content under the dialog
  7. Release the drag, dialog resizes to full screen again

Context

This experience seems to be linked to this Chrome behaviour
https://developers.google.com/web/updates/2016/12/url-bar-resizing

When using position:fixed, 100% means the actual viewport size (where as 100vh non-fixed is viewport size - address bar size)

It may be possible to fix this by temporarily increasing the height of the full screen dialog by an estimated size of the address bar.

May be similar to #5750

Your Environment

Tech Version
Material-UI 1.0.0-beta.34
React
browser mobile Chrome latest
etc
@oliviertassinari oliviertassinari added the component: dialog This is the name of the generic UI component, not the React module! label Mar 4, 2018
@oliviertassinari
Copy link
Member

oliviertassinari commented Mar 4, 2018

Using mobile Chrome, when I scroll the dialog up, I can see the content under the dialog

@djeeg I'm able to reproduce this behavior. However, it's only temporary, the height is adjusted as soon as I release my finger. So the impact is very limited. The fullscreen style comes from:
https://github.com/mui-org/material-ui/blob/9c68f852e1b4631fec6185109d5245f892e2fa76/src/Dialog/Dialog.js#L42-L49

I'm not aware of any way to solve this issue.

It may be possible to fix this by temporarily increasing the height of the full-screen dialog by an estimated size of the address bar.

Won't that be worse? Making the bottom of the dialog offscreen and unreachable?

@djeeg
Copy link
Contributor Author

djeeg commented Mar 4, 2018

impact is very limited

Yes agree.

I'm going to try something like this, and play around with the positioning to see if I can get a smooth UX

<Paper ...>
          ...
	  {children}
</Paper>
{
	fullScreen || (
		<div style={{position: 'fixed', bottom: -100, height: 100, width: '100%', backgroundColor: 'white'}}>
		</div>
	)
}

@oliviertassinari
Copy link
Member

@djeeg Feel free to submit a pull request if you find something elegant for improving the situation :). I'm closing the issue as it's not something I think it's important to address and that might not be fixable without a large overhead.

@oliviertassinari oliviertassinari added status: waiting for author Issue with insufficient information and removed need more information labels Jan 4, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
component: dialog This is the name of the generic UI component, not the React module! status: waiting for author Issue with insufficient information
Projects
None yet
Development

No branches or pull requests

2 participants