From fee0d4e2d8063b66d195920668c0d3a6d339817b Mon Sep 17 00:00:00 2001 From: sgrebnov Date: Wed, 7 Oct 2015 11:44:07 +0300 Subject: [PATCH] CB-9760 InAppBrowser: fallback to default window.open behavior on Ripple --- www/inappbrowser.js | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/www/inappbrowser.js b/www/inappbrowser.js index a85f27e..93eb420 100644 --- a/www/inappbrowser.js +++ b/www/inappbrowser.js @@ -19,6 +19,12 @@ * */ +// special patch to correctly work on Ripple emulator (CB-9760) +if (window.parent && !!window.parent.ripple) { // https://gist.github.com/triceam/4658021 + module.exports = window.open.bind(window); // fallback to default window.open behaviour + return; +} + var exec = require('cordova/exec'); var channel = require('cordova/channel'); var modulemapper = require('cordova/modulemapper');