From aacb6e316e9a6f2caf7e22e7965072d709fa8bde Mon Sep 17 00:00:00 2001 From: Philip Tellis Date: Thu, 29 Jan 2015 15:56:10 -0500 Subject: [PATCH] Do not send a beacon on iOS WebViews It turns out that submitting a hidden form to an anonymous iframe in a UIWebView on iOS will cause a new Safari window to open with our beacon URL. This is not desired behaviour, and until we can figure out a better way to send a beacon under these conditions, our best bet is to suppress the beacon. This is not entirely a problem because any beacon that would have been sent does not have any timing information (no previous page and no navtiming) --- boomerang.js | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/boomerang.js b/boomerang.js index 864b8dc2b..f7512daa4 100644 --- a/boomerang.js +++ b/boomerang.js @@ -634,6 +634,11 @@ boomr = { var input = document.createElement("input"), urls = [ impl.beacon_url ]; + // running inside a UIWebView. Our beacons don't work well here + if(navigator.standalone === false) { + return; + } + form.method = method; form.id = "beacon_form";