diff --git a/web/viewer.html b/web/viewer.html index d80056bad..0414e3316 100644 --- a/web/viewer.html +++ b/web/viewer.html @@ -79,10 +79,10 @@ limitations under the License.
- -
@@ -98,44 +98,44 @@ limitations under the License.
-
-
-
-
- +
@@ -143,37 +143,37 @@ limitations under the License. - - - - - Current View + Current View
-
-
- @@ -204,7 +204,7 @@ limitations under the License. data-l10n-id="page_rotate_cw" > -
+
diff --git a/web/viewer.js b/web/viewer.js index b2308b610..d19f3005a 100644 --- a/web/viewer.js +++ b/web/viewer.js @@ -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) {