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

Bug on layout when Dialog is open #1259

Closed
nckenn opened this issue Feb 19, 2019 · 11 comments
Closed

Bug on layout when Dialog is open #1259

nckenn opened this issue Feb 19, 2019 · 11 comments

Comments

@nckenn
Copy link

nckenn commented Feb 19, 2019

i dont know if this is a bug or not, currently clone the master branch, and when i try to open dialog this happen, but on your demo its seems ok, but on my local its not. hope someone can help me :) thanks

chrome_2019-02-19_18-29-46

@nnixaa
Copy link
Collaborator

nnixaa commented Feb 21, 2019

Hi @nckenn, please post your browser and OS with versions.

@blankstar85
Copy link
Contributor

I have the same issue, I was thinking it was something I did. Windows 10 and latest chrome

@nnixaa nnixaa transferred this issue from akveo/ngx-admin Feb 22, 2019
@nnixaa nnixaa added this to the 3.5.0 milestone Feb 22, 2019
@aefox
Copy link
Contributor

aefox commented Mar 7, 2019

I did some extra investigations. I found a way to reproduce this issue:

  • navigate to the ngx-admin
  • open developer tools
  • move developer tools at the bottom of the window
  • focus on the html tag in the explorer tab
  • increase the developer tools height until the height of the html becomes smaller than 647px
  • scroll at the bottom of the window
  • open any dialog

Screenshot with the style on the html when the scroll of the page is at the top:
image

Screenshot with the style on the html when the scroll of the page is at the bottom:
image

I don't know where this could come from. If anyone has any idea I could do a PR.

@nckenn
Copy link
Author

nckenn commented Mar 11, 2019

for now i added this class in my styles.scss to make it work properly :
.cdk-global-scrollblock { position: initial; width: initial; overflow: hidden; }

@aefox
Copy link
Contributor

aefox commented Mar 11, 2019

This seems to be coming from angular/components#7512 and angular/components#7390.

I started from @nckenn 's reply above and isolated the change to be:

.cdk-global-scrollblock {
  position: initial;
  overflow-y: hidden;
}

I have tested this fix on Edge, FF and Chrome and it works as expected (on both ltr and rtl). I wasn't able to test on IE11 because dev tools does not show me the styles for the html element (really weird).

@nnixaa @yggg what do you guys think? Should we do this override? If yes, where should this be best placed?

@nnixaa
Copy link
Collaborator

nnixaa commented Mar 12, 2019

@aefox I guess we should try and check it doesn't introduce any performance drawbacks. I believe https://github.com/akveo/nebular/blob/master/src/framework/theme/components/cdk/overlay/_overlay.theme.scss would be a good place since we already overwriting some styles there.

@Tibing Tibing added this to Sprint in Nebular via automation Apr 4, 2019
@akvaliya
Copy link

akvaliya commented Apr 5, 2019

What is the status on this issue? It adds top & left to html which creates issue.

@nbomberger
Copy link

nbomberger commented Jun 12, 2019

For anyone that is still on 3.5. This still works. Simply add this line to your index.html.

<style>.cdk-global-scrollblock { position: initial; width: initial; overflow: hidden; }</style>

@sharankasandula
Copy link

For anyone that is still on 3.5. This still works. Simply add this line to your index.html.

<style>.cdk-global-scrollblock { position: initial; width: initial; overflow: hidden; }</style>

For me, overflow: hidden did not work but overflow: initial worked.

@akvaliya
Copy link

For me <style>html { overflow: hidden; }</style> worked. Because cdk-global-scrollblock will be added runtime & before that scrollbar in html is generated.

@chuck0523
Copy link

chuck0523 commented Jun 7, 2022

This happened to me too

This wasn't enough for me.

.cdk-global-scrollblock {
  position: initial;
  overflow-y: hidden;
}

Combination with html style worked.

html {
  position: fixed;
  top: 0;
}

.cdk-global-scrollblock {
  position: initial;
  overflow-y: hidden;
}

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
No open projects
Nebular
  
Done
Development

No branches or pull requests

8 participants