Merge pull request #5488 from Snuffleupagus/presentationMode-no-zoom-followup
Prevent a "TypeError: pdfViewer is null" when the viewer loads (PR 5413 followup)
This commit is contained in:
commit
23bcab6f88
@ -2024,9 +2024,9 @@ window.addEventListener('keydown', function keydown(evt) {
|
||||
if (cmd === 1 || cmd === 8 || cmd === 5 || cmd === 12) {
|
||||
// either CTRL or META key with optional SHIFT.
|
||||
var pdfViewer = PDFViewerApplication.pdfViewer;
|
||||
var inPresentationMode =
|
||||
pdfViewer.presentationModeState === PresentationModeState.CHANGING ||
|
||||
pdfViewer.presentationModeState === PresentationModeState.FULLSCREEN;
|
||||
var inPresentationMode = pdfViewer &&
|
||||
(pdfViewer.presentationModeState === PresentationModeState.CHANGING ||
|
||||
pdfViewer.presentationModeState === PresentationModeState.FULLSCREEN);
|
||||
|
||||
switch (evt.keyCode) {
|
||||
case 70: // f
|
||||
|
Loading…
Reference in New Issue
Block a user