Skip to content

Commit

Permalink
Merge pull request mozilla#9796 from Snuffleupagus/disable-webViewerF…
Browse files Browse the repository at this point in the history
…ileInputChange-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 2f8e889 + e9c9698 commit c7ae064
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 c7ae064

Please sign in to comment.