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

ObservableMedia not emitting when *some* elements have flex-layout conditionals on attributes #599

Closed
ghost opened this issue Feb 6, 2018 · 2 comments

Comments

@ghost
Copy link

ghost commented Feb 6, 2018

Bug, feature request, or proposal:

ObservableMedia doesn't emit when some elements have a direcitve like
ngClass.gt-lm (the bug affects also "traditional" html attributes and fxFlex ones).
For instance in the provided example, mat-card isn't affected by the bug, but h3 is. Your mileage may vary

What is the expected behavior?

ObservableMedia should emit whether or not the current template contains a .xx-xx condition.

What is the current behavior?

ObservableMedia has a fuzzy behavior: if a switch is made from an unaffected page to an affected page it emits correctly on the first time, but doesn't emit anything from the second time onwards.
example: A -> affected, U -> unaffected
U-> A emits
A -> U emits
U -> A doesn't emit

What are the steps to reproduce?

https://stackblitz.com/edit/angular-ax1now-b2tond

Important: extend the viewer to make the gt-md true or change the value in internal.component.ts under (app/pages/internal)
enter -> go back -> enter
the second time the sidenav will be in "over" mode instead of being in "push" mode, because the observable won't emit anything (You can check in the console, I put a console.log to help just in case)

What is the use-case or motivation for changing an existing behavior?

It's obviously a bug.

Which versions of Angular, Material, OS, TypeScript, browsers are affected?

(at least) 5.1.2 to 5.2.2 angular, 5.1.2 to 5.2.2 angular/material, 2.0.0beta12 angular/flex-layout

Is there anything else we should know?

@CaerusKaru
Copy link
Member

This is an excellent catch, and it's a shame I'm only getting to this now. The root cause was discovered in a post-mortem on the beta20/beta21 releases, and we're slating to resolve this in beta 23 (Jan 2019). Until then, we're tracking this in the similar issue #426.

@CaerusKaru CaerusKaru removed this from the Backlog milestone Dec 21, 2018
@angular-automatic-lock-bot
Copy link

This issue has been automatically locked due to inactivity.
Please file a new issue if you are encountering a similar or related problem.

Read more about our automatic conversation locking policy.

This action has been performed automatically by a bot.

@angular-automatic-lock-bot angular-automatic-lock-bot bot locked and limited conversation to collaborators Sep 5, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

1 participant