matchmedia listener not triggered on specific window's size changes
Reported by
matthieu...@gmail.com,
Mar 30 2018
|
|||||||
Issue description
UserAgent: Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/65.0.3325.181 Safari/537.36
Steps to reproduce the problem:
1.
2.
3.
What is the expected behavior?
matchmedia should work like css media queries. So change of the window's size (open devtools on the right or click on the Windows statusbar fullscreen button) should trigger mathmedia listeners
What went wrong?
mathmedia listener are not triggered on every window's size changes
Example of code:
```
const mediaQueryMd = window.matchMedia('(min-width: 800px) and (max-width: 959px)')
const checkMediaQueryMd = () => {
if (mediaQueryMd.matches) {
// Do something
}
}
// Listen on window's size change
mediaQueryMd.addListener(checkMediaQueryMd)
// Initial check on page load
checkMediaQueryMd()
```
Did this work before? No
Does this work in other browsers? No
Same behavior on Firefox (similar to matchmedie_issue2 file). window.matchmedia listeners are not triggered
Chrome version: 65.0.3325.181 Channel: stable
OS Version: 10.0
Flash Version:
,
Apr 5 2018
Tried testing the issue by registering into url: https://staging.app.diagfactory.com/#/public/account/register but failed to register as after clicking on the link sent to the registered email directed to a page showing as server not found. Hence, was unable to test the issue. Reporter@ - Could you please provide sample test credentials to test the issue from TE-end. This will help us in triaging the issue further. Thanks...!!
,
Apr 5 2018
fixed now, but it's a staging env, resetted every day so it's pointless to create an account use this account, if you want to test: user: diaguser2@yopmail.com pass: diagpass
,
Apr 5 2018
Thank you for providing more feedback. Adding the requester to the cc list. For more details visit https://www.chromium.org/issue-tracking/autotriage - Your friendly Sheriffbot
,
Apr 6 2018
matthieu.dambrune@ Thanks for the issue. Tested this issue on Windows 10, Mac OS 10.12.6 and Ubuntu 14.04 on the reported version 65.0.3325.181 and the latest Canary 67.0.3389.0. On navigating to the link https://staging.app.diagfactory.com/#/public/account/ and login in with the credentials provided in C #3, and on resizing the windows, cannot see any listeners triggered to the Devtools -> console. Attached is the screen cast for reference. This is a Non-Regression issue as this behaviour is observed from M60 Chrome builds. Hence marking this as Untriaged for further updates from Dev. Thanks..
,
Apr 10 2018
,
Apr 10 2018
,
Apr 18 2018
Thanks for your time and sorry! It was a bug on my side, you can close this one.
,
Aug 21
Closing per comment above. |
|||||||
►
Sign in to add a comment |
|||||||
Comment 1 by vamshi.kommuri@chromium.org
, Apr 1 2018