Make navigation keys work on document load - avoid breaking embedded viewer, take 3

This commit is contained in:
Jonas 2013-02-24 17:49:42 +01:00
parent 854a4dd163
commit e4e4b1ab4e
2 changed files with 27 additions and 21 deletions

View file

@ -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) {