material icon indicating copy to clipboard operation
material copied to clipboard

dialog: after scrolling, dialog appears off screen on the second time opened

Open egor-xyz opened this issue 9 years ago • 12 comments

Actual Behavior:

  • What is the issue? * $mdDialog on mobile dialog out of screen, when you open second time
  • What is the expected behavior? modal not on screen

CodePen (or steps to reproduce the issue): *

  • Scroll body
  • Open modal first time:

.md-dialog-container:

  • Open modal first time: in-line styles: top: 885px; height: 628px;
  • Open same modal second time (no need to scroll again) in-line styles: top: 1770px; height: 628px;

top for second click changed twice - and now modal out of screen

AngularJS Versions: *

  • AngularJS Version: 1.6.6
  • AngularJS Material Version: 1.1.5

Additional Information:

  • Browser Type: * Mobile
  • Browser Version: * 11
  • OS: * iOS 11

egor-xyz avatar Oct 08 '17 11:10 egor-xyz

If you rotate the device does the modal come back on the screen?

fetters5 avatar Oct 09 '17 19:10 fetters5

When you rotate device dialog take all screen, when you rotate back it showing not on centre.

egor-xyz avatar Oct 09 '17 20:10 egor-xyz

ditto on this... +1

scriptsure avatar Oct 17 '17 01:10 scriptsure

+1 - this is hitting us hard on production

noamamit92 avatar Oct 30 '17 08:10 noamamit92

Did anyone find a workaround?

noamamit92 avatar Oct 30 '17 08:10 noamamit92

Please fix this issue. Super important. Yes when device rotated modal back but not in center, after you rotate back modal still not centered.

egor-xyz avatar Oct 30 '17 08:10 egor-xyz

I used the following as a workaround which worked in my case but definitely not ideal

.md-dialog-container {
  height: 100% !important;
  position: fixed !important;
  top: 0px !important;
}

fetters5 avatar Oct 30 '17 16:10 fetters5

@fetters5 - thanks for the workaround

noamamit92 avatar Nov 01 '17 14:11 noamamit92

Its impacting us also when this will be fixed?

pankajjain1 avatar Nov 02 '17 21:11 pankajjain1

@fetters5 this fix is well working, thanks a lot!

HZooly avatar Jan 03 '18 16:01 HZooly

Thanks a lot, @fetters5 !

TheRealSunTzu avatar Mar 16 '18 00:03 TheRealSunTzu

Closing as a duplicate of https://github.com/angular/material/issues/10675.

Splaktar avatar Mar 16 '18 05:03 Splaktar