Merge pull request #3177 from Snuffleupagus/bug864619
Make spacebar work on document load - fixes bug 864619
This commit is contained in:
commit
8e5575421a
@ -76,7 +76,7 @@ limitations under the License.
|
||||
<script type="text/javascript" src="viewer.js"></script>
|
||||
</head>
|
||||
|
||||
<body>
|
||||
<body tabindex="1">
|
||||
<div id="outerContainer" class="loadingInProgress">
|
||||
|
||||
<div id="sidebarContainer">
|
||||
@ -212,7 +212,7 @@ limitations under the License.
|
||||
data-l10n-id="page_rotate_cw" ></menuitem>
|
||||
</menu>
|
||||
|
||||
<div id="viewerContainer" tabindex="1">
|
||||
<div id="viewerContainer">
|
||||
<div id="viewer" contextmenu="viewerContextMenu"></div>
|
||||
</div>
|
||||
|
||||
|
@ -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…
Reference in New Issue
Block a user