Skip to content

Commit

Permalink
Merge pull request #9796 from Snuffleupagus/disable-webViewerFileInpu…
Browse files Browse the repository at this point in the history
…tChange-PresentationMode

Disable (drag-and-drop) file opening if Presentation Mode is active (PR 9794 follow-up)
  • Loading branch information
timvandermeij authored Jun 11, 2018
2 parents 3ac638f + ba623c7 commit 2030d17
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions web/app.js
Original file line number Diff line number Diff line change
Expand Up @@ -1925,6 +1925,10 @@ function webViewerHashchange(evt) {
let webViewerFileInputChange;
if (typeof PDFJSDev === 'undefined' || PDFJSDev.test('GENERIC')) {
webViewerFileInputChange = function webViewerFileInputChange(evt) {
if (PDFViewerApplication.pdfViewer &&
PDFViewerApplication.pdfViewer.isInPresentationMode) {
return; // Opening a new PDF file isn't supported in Presentation Mode.
}
let file = evt.fileInput.files[0];

if (URL.createObjectURL && !AppOptions.get('disableCreateObjectURL')) {
Expand Down

0 comments on commit 2030d17

Please sign in to comment.