cordova-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From an-s...@apache.org
Subject cordova-plugin-inappbrowser git commit: CB-9760 InAppBrowser: fallback to default window.open behavior on Ripple
Date Wed, 07 Oct 2015 09:05:25 GMT
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-segreb@microsoft.com>
Authored: Wed Oct 7 11:44:07 2015 +0300
Committer: sgrebnov <v-segreb@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


Mime
View raw message