]> _ Git - fluidbook-html5.git/commitdiff
fix #1845 @0:20
authorVincent Vanwaelscappel <vincent@cubedesigners.com>
Thu, 21 Dec 2017 10:50:47 +0000 (11:50 +0100)
committerVincent Vanwaelscappel <vincent@cubedesigners.com>
Thu, 21 Dec 2017 10:50:47 +0000 (11:50 +0100)
js/libs/fluidbook/fluidbook.js
js/libs/fluidbook/fluidbook.support.js

index 696940b8a3174d998244cfdc5037e344d98d57eb..7706b13d437a06fdbbb56d57cf76c877cfdc7a12 100644 (file)
@@ -1059,7 +1059,20 @@ Fluidbook.prototype = {
             replace = undefined;
         }
         // Open the window
-        var w = window.open(url, mtarget, options, replace);
+        var w;
+        if (options == undefined && replace == undefined) {
+            if (this.support.IE == 0) {
+                w = window.open(url, mtarget);
+            } else {
+                $(body).append('<a id="wopen" href="' + url + '" target="' + mtarget + '"></a>');
+                $("#wopen").trigger('click');
+                $("#wopen").remove();
+            }
+
+        } else {
+            w = window.open(url, mtarget, options, replace);
+        }
+
         try {
             // Attempt to focus opened windows (useful for already opened windows)
             if (target == '_new' || target == '_unique') {
index 5f51d4da0052d292234e7a49129f9106ba292c53..ded1923c5f3d6f5bb257452350610573efaf958f 100644 (file)
@@ -1,6 +1,12 @@
 function FluidbookSupport(fluidbook) {
     this.fluidbook = fluidbook;
     this.userAgent = navigator.userAgent;
+    this.IE = 0;
+    try {
+        this.IE = navigator.userAgent.match(/(MSIE |Trident.*rv[ :])([0-9]+)/)[2];
+    }
+    catch (e) {
+    }
     this.android = this.fitScreenAtZero = this.userAgent.search(/android/i) > -1 || this.userAgent.search(/galaxy/i) > -1;
     this.android3 = this.android && this.userAgent.search(/android 3/i) > -1;
     this.iOS = this.userAgent.search(/ipad/i) > -1 || this.userAgent.search(/iphone/i) > -1 || this.userAgent.search(/ipod/i) > -1;