You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository has been archived by the owner on Jan 6, 2025. It is now read-only.
When maximizing a window, the media observer should detect the change in view port width and report the correct query matches.
What is the current behavior?
On Firefox (71.0 64 bit) - when maximizing the window, the media observer reports a conflicting set of query matches, with the original size reported first, as per the below example:
[{"matches": true,"mediaQuery": "screen and (min-width: 0px) and (max-width: 599.9px)","mqAlias": "xs","suffix": "Xs","priority": 1000,"property": ""},{"matches": true,"mediaQuery": "screen and (max-width: 599.9px)","mqAlias": "lt-sm","suffix": "LtSm","priority": 950,"property": ""},{"matches": true,"mediaQuery": "screen and (max-width: 959.9px)","mqAlias": "lt-md","suffix": "LtMd","priority": 850,"property": ""},{"matches": true,"mediaQuery": "screen and (max-width: 1279.9px)","mqAlias": "lt-lg","suffix": "LtLg","priority": 750,"property": ""},{"matches": true,"mediaQuery": "screen and (max-width: 1919.9px)","mqAlias": "lt-xl","suffix": "LtXl","priority": 650,"property": ""},{"matches": true,"mediaQuery": "screen and (min-width: 1920px) and (max-width: 4999.9px)","mqAlias": "xl","suffix": "Xl","priority": 600,"property": ""},{"matches": true,"mediaQuery": "screen and (min-width: 1920px)","mqAlias": "gt-lg","suffix": "GtLg","priority": -650,"property": ""},{"matches": true,"mediaQuery": "screen and (min-width: 1280px)","mqAlias": "gt-md","suffix": "GtMd","priority": -750,"property": ""},{"matches": true,"mediaQuery": "screen and (min-width: 960px)","mqAlias": "gt-sm","suffix": "GtSm","priority": -850,"property": ""},{"matches": true,"mediaQuery": "screen and (min-width: 600px)","mqAlias": "gt-xs","suffix": "GtXs","priority": -950,"property": ""}]
When resizing the window manually by clicking and dragging the edge of the window, this does not occur.
What are the steps to reproduce?
Simply add this section of code to a project and observe the printed array when maximising a window in Firefox.
MediaObserver on Firefox seems to be a bit buggy in general, see first comment in #1059
We experience strange MediaObserver Behaviour in Firefox, too. With both, the new asObservable() method, and the deprecated "media$" method
Bug Report
What is the expected behavior?
When maximizing a window, the media observer should detect the change in view port width and report the correct query matches.
What is the current behavior?
On Firefox (71.0 64 bit) - when maximizing the window, the media observer reports a conflicting set of query matches, with the original size reported first, as per the below example:
When resizing the window manually by clicking and dragging the edge of the window, this does not occur.
What are the steps to reproduce?
Simply add this section of code to a project and observe the printed array when maximising a window in Firefox.
What is the use-case or motivation for changing an existing behavior?
Mobile styling dependent on the observer aren't being cleared on window re-size.
Which versions of Angular, Material, OS, TypeScript, browsers are affected?
I've only tested it in Firefox (71.0 64 bit). Chrome seems to handle the window resizing fine.
The versions of angular libraries I am using are below:
The text was updated successfully, but these errors were encountered: