1
0
Fork 0
mirror of https://github.com/mozilla/pdf.js.git synced 2025-04-26 10:08:06 +02:00

Also update the browser history when the user *manually* change pages using the pageNumber-input (PR 12493 follow-up)

This patch addresses a review comment, which pointed out that we should *also* handle the pageNumber-input, from PR 12493.

Given that a user *manually* changing pages using the pageNumber-input, on the toolbar, could be regarded as a pretty strong indication of user-intent w.r.t. navigation in the document, hence I suppose that updating the browser history in this case as well probably won't hurt.
This commit is contained in:
Jonas Jenwald 2020-10-31 10:17:28 +01:00
parent 4eaa058c16
commit 911948c5c0
4 changed files with 27 additions and 10 deletions

View file

@ -2537,7 +2537,7 @@ function webViewerPageNumberChanged(evt) {
// Note that for `<input type="number">` HTML elements, an empty string will
// be returned for non-number inputs; hence we simply do nothing in that case.
if (evt.value !== "") {
pdfViewer.currentPageLabel = evt.value;
PDFViewerApplication.pdfLinkService.goToPage(evt.value);
}
// Ensure that the page number input displays the correct value, even if the