To reproduce the issue:
- Serve
script.js
andindex.html
with a simple HTTP server.
$ python3 -m http.server
- Ensure your ad-blocker is disabled and navigate to any page on www.ralphlauren.com. I was able to reproduce the error in Firefox and Chrome.
- Run
bookmarklet.js
either as a bookmarklet or in the browser url. - The iframe created by
script.js
sends a message to a listener inindex.html
once, then is hammered with additional events (due to the bug) with data similar to"{"cxr":true,"id":"de358f9-93588236-068e-9f0c-fe732…le-frame'][1]"],"sid":"7_","sp":{"x":0,"y":6610}}"
, all of which are logged to the console.
We think it's related to the survey modal. Let us know if you need any more information to reproduce!
The source of this bug was found to be Ralph Lauren's configuration of their third-party "Foresee" survey modal, and was resolved by adding the following snippet to our front-end code:
This snippet seems to be extensible to all sites that implement the Foresee modal service.