Skip to content

Commit

Permalink
Remove the disableFullscreen hack for embedded IE 11 (issue 9585)
Browse files Browse the repository at this point in the history
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 jquery/jquery@ff1a082 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 no other UI functionality can be controlled in a similar manner.

Fixes 9585.
  • Loading branch information
Snuffleupagus committed Jun 14, 2018
1 parent b590519 commit edf1001
Show file tree
Hide file tree
Showing 3 changed files with 0 additions and 18 deletions.
4 changes: 0 additions & 4 deletions web/app.js
Original file line number Diff line number Diff line change
Expand Up @@ -553,10 +553,6 @@ let PDFViewerApplication = {
support = false;
}
}
if (support && AppOptions.get('disableFullscreen') === true) {
support = false;
}

return shadow(this, 'supportsFullscreen', support);
},

Expand Down
5 changes: 0 additions & 5 deletions web/app_options.js
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down
9 changes: 0 additions & 9 deletions web/viewer_compatibility.js
Original file line number Diff line number Diff line change
Expand Up @@ -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() {
Expand Down

0 comments on commit edf1001

Please sign in to comment.