mirror of
https://github.com/zen-browser/pdf.js.git
synced 2025-07-09 17:55:37 +02:00
Make spacebar work on document load - fixes bug 864619
This commit is contained in:
parent
29466c88c7
commit
adf61ea5b0
2 changed files with 9 additions and 8 deletions
|
@ -1442,6 +1442,13 @@ var PDFView = {
|
|||
left + ',' + top;
|
||||
}
|
||||
self.setInitialView(storedHash, scale);
|
||||
|
||||
// Make all navigation keys work on document load,
|
||||
// unless the viewer is embedded in another page.
|
||||
if (window.parent === window) {
|
||||
PDFView.container.focus();
|
||||
PDFView.container.blur();
|
||||
}
|
||||
});
|
||||
|
||||
pagesPromise.then(function() {
|
||||
|
@ -1480,12 +1487,6 @@ var PDFView = {
|
|||
self.outline = new DocumentOutlineView(outline);
|
||||
document.getElementById('viewOutline').disabled = !outline;
|
||||
});
|
||||
|
||||
// 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