-
Notifications
You must be signed in to change notification settings - Fork 2.1k
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
Apply matchMedia to the top frame #3612
Conversation
In case Prebid.js is called from within an iFrame, matchMedia should be applied to window.top, not the containing iFrame. This PR falls back to the legacy behavior in case of unfriendly iFrames.
CI fails because of a Yieldbot adapter problem on Chrome 61.0.3163 (Windows 10.0.0)? 🤔 |
@mike-chowla It would be great if this PR could make it into the next release. This is quite an annoying bug, as it also impacts postbid. |
I'm doubtful it can get in the new next release because it needs to two reviews due to being a core change. What scenarios do you expect this to fix? I'm trying the think through all cases to understand why it makes sense that the media query is applied to top window rather than the iframe? |
Why would you apply it to an iframe? Isn't the goal to know the full width of a window? |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Seems like a reasonable thing to me.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Since Kendall is good with it and I don't see any code issues, I'm approving and merging
Type of change
Description of change
In case Prebid.js is called from within an iFrame, matchMedia should be applied to window.top, not the containing iFrame.
This PR falls back to the legacy behavior in case of unfriendly iFrames.