mirror of
https://github.com/mozilla/pdf.js.git
synced 2025-04-20 23:28:06 +02:00
Disable the "Go to First/Last Page" buttons when the first/last page is currently active
Since the "Previous/Next Page" buttons are disabled when the first/last page is active, I think that for the sake of consistency the "Go to First/Last Page" should behave the same way.
This commit is contained in:
parent
249b8f4137
commit
ca1dbda348
1 changed files with 6 additions and 1 deletions
|
@ -2211,8 +2211,13 @@ window.addEventListener('pagechange', function pagechange(evt) {
|
|||
}
|
||||
}
|
||||
}
|
||||
var numPages = PDFView.pages.length;
|
||||
|
||||
document.getElementById('previous').disabled = (page <= 1);
|
||||
document.getElementById('next').disabled = (page >= PDFView.pages.length);
|
||||
document.getElementById('next').disabled = (page >= numPages);
|
||||
|
||||
document.getElementById('firstPage').disabled = (page <= 1);
|
||||
document.getElementById('lastPage').disabled = (page >= numPages);
|
||||
}, true);
|
||||
|
||||
function handleMouseWheel(evt) {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue