Merge pull request #9796 from Snuffleupagus/disable-webViewerFileInputChange-PresentationMode
Disable (drag-and-drop) file opening if Presentation Mode is active (PR 9794 follow-up)
This commit is contained in:
commit
2030d1718f
@ -1925,6 +1925,10 @@ function webViewerHashchange(evt) {
|
|||||||
let webViewerFileInputChange;
|
let webViewerFileInputChange;
|
||||||
if (typeof PDFJSDev === 'undefined' || PDFJSDev.test('GENERIC')) {
|
if (typeof PDFJSDev === 'undefined' || PDFJSDev.test('GENERIC')) {
|
||||||
webViewerFileInputChange = function webViewerFileInputChange(evt) {
|
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];
|
let file = evt.fileInput.files[0];
|
||||||
|
|
||||||
if (URL.createObjectURL && !AppOptions.get('disableCreateObjectURL')) {
|
if (URL.createObjectURL && !AppOptions.get('disableCreateObjectURL')) {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user