You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@cordova.apache.org by an...@apache.org on 2015/10/07 11:05:25 UTC

cordova-plugin-inappbrowser git commit: CB-9760 InAppBrowser: fallback to default window.open behavior on Ripple

Repository: cordova-plugin-inappbrowser
Updated Branches:
  refs/heads/master c08e23914 -> fee0d4e2d


CB-9760 InAppBrowser: fallback to default window.open behavior on Ripple


Project: http://git-wip-us.apache.org/repos/asf/cordova-plugin-inappbrowser/repo
Commit: http://git-wip-us.apache.org/repos/asf/cordova-plugin-inappbrowser/commit/fee0d4e2
Tree: http://git-wip-us.apache.org/repos/asf/cordova-plugin-inappbrowser/tree/fee0d4e2
Diff: http://git-wip-us.apache.org/repos/asf/cordova-plugin-inappbrowser/diff/fee0d4e2

Branch: refs/heads/master
Commit: fee0d4e2d8063b66d195920668c0d3a6d339817b
Parents: c08e239
Author: sgrebnov <v-...@microsoft.com>
Authored: Wed Oct 7 11:44:07 2015 +0300
Committer: sgrebnov <v-...@microsoft.com>
Committed: Wed Oct 7 12:03:01 2015 +0300

----------------------------------------------------------------------
 www/inappbrowser.js | 6 ++++++
 1 file changed, 6 insertions(+)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/cordova-plugin-inappbrowser/blob/fee0d4e2/www/inappbrowser.js
----------------------------------------------------------------------
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');


---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@cordova.apache.org
For additional commands, e-mail: commits-help@cordova.apache.org