-
Notifications
You must be signed in to change notification settings - Fork 773
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 does not emit when largest viewport is active #275
Comments
@TylerDev6 - [{
alias: 'xs',
mediaQuery: 'screen and (max-width: 767px)'
}, {
alias: 'sm',
mediaQuery: 'screen and (max-width: 767px)'
}, {
alias: 'md',
mediaQuery: 'screen and (min-width: 768px) and (max-width: 1023px)'
}, {
alias: 'lg',
mediaQuery: 'screen and (min-width: 1024px)'
}, {
alias: 'xl',
mediaQuery: 'screen and (min-width: 1024px)'
}]
|
right, that was a problem I had encountered. As you can see, I only really need 3 breakpoints but the API indicates that I must provide all 5. Since I didn't want layout changes triggered by the default xs and xl breakpoints I overrode them. |
However, why would that actually cause the behaviour I'm seeing? xs / sm overlap but I still get emits for xs.... lg and xl overlap but I don't get emits for either. |
Related to #245 |
Will be fixed with PR #313.
|
ObservableMedia only dispatches notifications for activated, non-overlapping breakpoints. If the MatchMedia lastReplay value is an *overlapping* breakpoint (e.g. `lt-md`, `gt-lg`) then that value will be filtered by ObservableMedia and not be emitted to subscribers. * MatchMedia breakpoints registration was not correct * overlapping breakpoints were registered in the wrong order * non-overlapping breakpoints should be registered last; so the BehaviorSubject's last replay value should be an non-overlapping breakpoint range. > See working plunker: https://plnkr.co/edit/yylQr2IdbGy2Yr00srrN?p=preview Fixes #245, #275.
ObservableMedia only dispatches notifications for activated, non-overlapping breakpoints. If the MatchMedia lastReplay value is an *overlapping* breakpoint (e.g. `lt-md`, `gt-lg`) then that value will be filtered by ObservableMedia and not be emitted to subscribers. * MatchMedia breakpoints registration was not correct * overlapping breakpoints were registered in the wrong order * non-overlapping breakpoints should be registered last; so the BehaviorSubject's last replay value should be an non-overlapping breakpoint range. * Optimize stylesheet injection to group `n` mediaQuerys in a single stylesheet > See working plunker: https://plnkr.co/edit/yylQr2IdbGy2Yr00srrN?p=preview Fixes #245, #275, #303
ObservableMedia only dispatches notifications for activated, non-overlapping breakpoints. If the MatchMedia lastReplay value is an *overlapping* breakpoint (e.g. `lt-md`, `gt-lg`) then that value will be filtered by ObservableMedia and not be emitted to subscribers. * MatchMedia breakpoints registration was not correct * overlapping breakpoints were registered in the wrong order * non-overlapping breakpoints should be registered last; so the BehaviorSubject's last replay value should be an non-overlapping breakpoint range. * Optimize stylesheet injection to group `n` mediaQuerys in a single stylesheet > See working plunker: https://plnkr.co/edit/yylQr2IdbGy2Yr00srrN?p=preview Fixes #245, #275, #303
ObservableMedia only dispatches notifications for activated, non-overlapping breakpoints. If the MatchMedia lastReplay value is an *overlapping* breakpoint (e.g. `lt-md`, `gt-lg`) then that value will be filtered by ObservableMedia and not be emitted to subscribers. * MatchMedia breakpoints registration was not correct * overlapping breakpoints were registered in the wrong order * non-overlapping breakpoints should be registered last; so the BehaviorSubject's last replay value should be an non-overlapping breakpoint range. * Optimize stylesheet injection to group `n` mediaQuerys in a single stylesheet > See working plunker: https://plnkr.co/edit/yylQr2IdbGy2Yr00srrN?p=preview Fixes #245, #275, #303
ObservableMedia only dispatches notifications for activated, non-overlapping breakpoints. If the MatchMedia lastReplay value is an *overlapping* breakpoint (e.g. `lt-md`, `gt-lg`) then that value will be filtered by ObservableMedia and not be emitted to subscribers. * MatchMedia breakpoints registration was not correct * overlapping breakpoints were registered in the wrong order * non-overlapping breakpoints should be registered last; so the BehaviorSubject's last replay value should be an non-overlapping breakpoint range. * Optimize stylesheet injection to group `n` mediaQuerys in a single stylesheet > See working plunker: https://plnkr.co/edit/yylQr2IdbGy2Yr00srrN?p=preview Fixes #245, #275, #303
ObservableMedia only dispatches notifications for activated, non-overlapping breakpoints. If the MatchMedia lastReplay value is an *overlapping* breakpoint (e.g. `lt-md`, `gt-lg`) then that value will be filtered by ObservableMedia and not be emitted to subscribers. * MatchMedia breakpoints registration was not correct * overlapping breakpoints were registered in the wrong order * non-overlapping breakpoints should be registered last; so the BehaviorSubject's last replay value should be an non-overlapping breakpoint range. * Optimize stylesheet injection to group `n` mediaQuerys in a single stylesheet > See working plunker: https://plnkr.co/edit/yylQr2IdbGy2Yr00srrN?p=preview Fixes #245, #275, #303
Fixed with SHA 00ac57a |
This issue has been automatically locked due to inactivity. Read more about our automatic conversation locking policy. This action has been performed automatically by a bot. |
This seems to be happening with custom breakpoints and I'm using 2.0.0-beta6, but it may still be happening with other instances as well.
Here's a plunker that shows the custom breakpoints. Scaling the app up and down shows that events are emitted to console for small and medium, but not the largest size.
https://plnkr.co/edit/WvZtQ024vu2R816EMPQD?p=preview
The text was updated successfully, but these errors were encountered: