Properly disable presentation mode when the viewer is embedded
This commit is contained in:
parent
c5bcd7a7ef
commit
3cce7be9ce
@ -400,6 +400,10 @@ var PDFView = {
|
||||
document.mozFullScreenEnabled === false ||
|
||||
document.webkitFullscreenEnabled === 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,
|
||||
@ -1392,6 +1396,9 @@ var PDFView = {
|
||||
},
|
||||
|
||||
presentationMode: function pdfViewPresentationMode() {
|
||||
if (!this.supportsFullscreen) {
|
||||
return false;
|
||||
}
|
||||
var isPresentationMode = document.fullscreenElement ||
|
||||
document.mozFullScreen ||
|
||||
document.webkitIsFullScreen;
|
||||
|
Loading…
Reference in New Issue
Block a user