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

Layout header does not re-render #452

Closed
grizzm0 opened this issue Jan 19, 2017 · 9 comments
Closed

Layout header does not re-render #452

grizzm0 opened this issue Jan 19, 2017 · 9 comments

Comments

@grizzm0
Copy link

grizzm0 commented Jan 19, 2017

I've got a similar issue as I had with #89 but in the latest version.

I've got a full page login component. After you login I use router.navigate(['/']); to navigate to a component for logged in users (contains the layout). This does not trigger the media query listeners from the looks of it.

The layout header has margin-left: 240px; and does not update even if I resize the page.

@nikoTM
Copy link

nikoTM commented Jan 19, 2017

Could you please provide a plunkr ?

@mseemann
Copy link
Owner

pls provide a plnkr that demonstrates your problem. Thx.

@grizzm0
Copy link
Author

grizzm0 commented Jan 19, 2017

I only managed to reproduce it on plnkr a few times. And only while in full preview mode.

http://embed.plnkr.co/f860usb4eBdTAsfDH5he/

Edit: The issue is that the header acts as if the drawer is open. It happens 100% of the times on my current project. And as I said, only managed to reproduce it a few times at plnkr. :/

Edit2: This is what it looks like in my project after login.

@grizzm0
Copy link
Author

grizzm0 commented Jan 19, 2017

Found out what's causing it and updated the plnkr.

The first login works fine. If you then click logout and try to login again the error appears.

@nikoTM
Copy link

nikoTM commented Jan 19, 2017

I was not able to reproduce, what browser are you using ?

@grizzm0
Copy link
Author

grizzm0 commented Jan 19, 2017

Chrome 55.0.2883.95 on macOS 10.12.2

Mozilla/5.0 (Macintosh; Intel Mac OS X 10_12_2) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/55.0.2883.95 Safari/537.36

Edit: Just tried in IE, Safari and Firefox aswell. Same issue.

@grizzm0
Copy link
Author

grizzm0 commented Jan 19, 2017

@nikoTM Note that it only appears in mobile-view (drawer closed).

@nikoTM
Copy link

nikoTM commented Jan 19, 2017

@mseemann seems like is-small-screen is not being added for some reason.

@mseemann
Copy link
Owner

@grizzm0 thx for finding this, @nikoTM thx for your help analysing this issue. the problem was that the MdlScreenSizeService did not provide the current screen size after a subscription. now it does - i hope:) will be available in a few minutes as 2.12.1.

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

No branches or pull requests

3 participants