From 349b7d5e9c6ba6c9aa2007ff8e0f61f6af4ec7b0 Mon Sep 17 00:00:00 2001 From: Jonas Jenwald Date: Thu, 14 Jun 2018 11:51:25 +0200 Subject: [PATCH] Remove the `disableFullscreen` hack for embedded IE 11 (issue 9585) It appears that Microsoft silently fixed the problem that required disabling of fullscreen mode, in e.g. `iframe`s, in IE 11; please see issue 4711 and PR 5525 for historical context. Unfortunately my Google-fu isn't strong enough to find any *official* information regarding the fixing of the browser bug in IE. However testing of the default viewer in IE 11, with this patch applied, it now appears that Presentation Mode is working correctly even in an `iframe` in IE 11. Further anecdotal evidence that the bug is in fact fixed, is for example that jQuery previously contained a work-around for the IE bug. However, that's removed over two years ago now; see https://github.com/jquery/jquery/commit/ff1a0822f72d2b39fac691dfcceab6ede5623b90 and the issues referenced there. Given that the default viewer isn't intended to be used as-is anyway (in custom deployments), it didn't seem necessary to keep the `disableFullscreen` option around since it was *only* ever added for compatibility purposes. Fixes 9585. --- web/app.js | 4 ---- web/app_options.js | 5 ----- web/viewer_compatibility.js | 9 --------- 3 files changed, 18 deletions(-) diff --git a/web/app.js b/web/app.js index d75d00691..02495a20a 100644 --- a/web/app.js +++ b/web/app.js @@ -553,10 +553,6 @@ let PDFViewerApplication = { support = false; } } - if (support && AppOptions.get('disableFullscreen') === true) { - support = false; - } - return shadow(this, 'supportsFullscreen', support); }, diff --git a/web/app_options.js b/web/app_options.js index 8fdd20a60..266c90484 100644 --- a/web/app_options.js +++ b/web/app_options.js @@ -43,11 +43,6 @@ const defaultOptions = { value: '', kind: OptionKind.VIEWER, }, - disableFullscreen: { - /** @type {boolean} */ - value: viewerCompatibilityParams.disableFullscreen || false, - kind: OptionKind.VIEWER, - }, disableHistory: { /** @type {boolean} */ value: false, diff --git a/web/viewer_compatibility.js b/web/viewer_compatibility.js index 2debdc412..d73c26834 100644 --- a/web/viewer_compatibility.js +++ b/web/viewer_compatibility.js @@ -18,17 +18,8 @@ if (typeof PDFJSDev === 'undefined' || PDFJSDev.test('GENERIC')) { const userAgent = (typeof navigator !== 'undefined' && navigator.userAgent) || ''; const isAndroid = /Android/.test(userAgent); - const isIE = /Trident/.test(userAgent); const isIOS = /\b(iPad|iPhone|iPod)(?=;)/.test(userAgent); - // Disable fullscreen support for certain problematic configurations. - // Support: IE11+ (when embedded). - (function checkFullscreenSupport() { - if (isIE && window.parent !== window) { - compatibilityParams.disableFullscreen = true; - } - })(); - // Limit canvas size to 5 mega-pixels on mobile. // Support: Android, iOS (function checkCanvasSizeLimitation() {