mirror of
https://github.com/zen-browser/pdf.js.git
synced 2025-07-08 01:10:08 +02:00
Ensure that automatic printing still works when the viewer and/or its pages are hidden (bug 1618621, bug 1618955)
Please note that this patch, on its own, won't magically fix all of these printing bugs without [bug 1618553](https://bugzilla.mozilla.org/show_bug.cgi?id=1618553) also being fixed. (However I don't foresee that being too difficult, famous last words :-), but it will as suggested require a platform API that we can notify when the viewer is ready.) Fixes https://bugzilla.mozilla.org/show_bug.cgi?id=1618621 Fixes https://bugzilla.mozilla.org/show_bug.cgi?id=1618955 Fixes 8208
This commit is contained in:
parent
85838fc505
commit
c5b0b5c754
2 changed files with 23 additions and 2 deletions
|
@ -229,7 +229,7 @@ function binarySearchFirstItem(items, condition) {
|
|||
let minIndex = 0;
|
||||
let maxIndex = items.length - 1;
|
||||
|
||||
if (items.length === 0 || !condition(items[maxIndex])) {
|
||||
if (maxIndex < 0 || !condition(items[maxIndex])) {
|
||||
return items.length;
|
||||
}
|
||||
if (condition(items[minIndex])) {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue