-
Notifications
You must be signed in to change notification settings - Fork 2.2k
bugfix for Firefox for some ads that use document.write #3524
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
Conversation
I don't understand why the test in Circle CI would be failing and I surely don't want to modify the test. Please, can someone more experienced with the tests of this project can check the code ? |
@jarnix - please take a look at the unit tests that are failing due to this change. I would call this a pretty important change that could break even more -- unit tests don't try renders in all browsers. Please describe the problem you're trying to solve and help us understand why adding doc.open is necessary and safe for other browsers. |
@bretg I agree with you, it's a "pretty important change", that's why I did not want to modify the tests but I got it why the test was failing. The doc.open method was called but not monitored by sinon.spy() so I added it. So now the tests are okay in the CI, but I really would like a human check though.. |
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.
I think this is fine.
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.
LGTM; I tested this change in Chrome and Firefox with banner/outstream type ads as well as using the Universal Creative templates in both safeframe/non-safeframe setups. The ads rendered fine in all cases.
Type of change
Description of change
This is a fix targeted for Firefox that creates an entry in history after a document.write. It means that when an ad uses document.write (as we see in a lot of ads on our 30 M users network), the user has to click the "back" button twice to go back. The bug is 17 years old (https://bugzilla.mozilla.org/show_bug.cgi?id=148794) and the workaround is described here for example : https://stackoverflow.com/questions/19624452/workaround-to-firefox-creating-new-history-after-each-document-write/32677679#32677679 .