From f0d51356e4dbb5a509560facfb050a63ac54daf3 Mon Sep 17 00:00:00 2001 From: Vincent Vanwaelscappel Date: Thu, 21 Dec 2017 11:50:47 +0100 Subject: [PATCH] fix #1845 @0:20 --- js/libs/fluidbook/fluidbook.js | 15 ++++++++++++++- js/libs/fluidbook/fluidbook.support.js | 6 ++++++ 2 files changed, 20 insertions(+), 1 deletion(-) diff --git a/js/libs/fluidbook/fluidbook.js b/js/libs/fluidbook/fluidbook.js index 696940b8..7706b13d 100644 --- a/js/libs/fluidbook/fluidbook.js +++ b/js/libs/fluidbook/fluidbook.js @@ -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(''); + $("#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') { diff --git a/js/libs/fluidbook/fluidbook.support.js b/js/libs/fluidbook/fluidbook.support.js index 5f51d4da..ded1923c 100644 --- a/js/libs/fluidbook/fluidbook.support.js +++ b/js/libs/fluidbook/fluidbook.support.js @@ -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; -- 2.39.5