Merge pull request #3641 from Snuffleupagus/properly-disable-presentationMode-when-embedded

Properly disable presentation mode when the viewer is embedded
This commit is contained in:
Brendan Dahl 2013-09-17 13:49:11 -07:00
commit c270d7e056

View File

@ -399,6 +399,10 @@ var PDFView = {
document.webkitFullscreenEnabled === false ||
document.msFullscreenEnabled === false) {
support = false;
} else if (this.isViewerEmbedded) {
// Need to check if the viewer is embedded as well, to prevent issues with
// presentation mode when the viewer is embedded in '<object>' tags.
support = false;
}
Object.defineProperty(this, 'supportsFullscreen', { value: support,
@ -1385,6 +1389,9 @@ var PDFView = {
},
presentationMode: function pdfViewPresentationMode() {
if (!this.supportsFullscreen) {
return false;
}
var isPresentationMode = document.fullscreenElement ||
document.mozFullScreen ||
document.webkitIsFullScreen ||