Make navigation keys work on document load - avoid breaking embedded viewer, take 3
This commit is contained in:
parent
854a4dd163
commit
e4e4b1ab4e
2 changed files with 27 additions and 21 deletions
|
@ -1334,6 +1334,12 @@ var PDFView = {
|
|||
}
|
||||
|
||||
self.setInitialView(storedHash, scale);
|
||||
|
||||
// Make all navigation keys work on document load,
|
||||
// unless the viewer is embedded in another page.
|
||||
if (window.parent.location === window.location) {
|
||||
PDFView.container.focus();
|
||||
}
|
||||
});
|
||||
|
||||
pdfDocument.getMetadata().then(function(data) {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue