mirror of
https://github.com/mozilla/pdf.js.git
synced 2025-04-21 23:58:07 +02:00
Actually reset the findResultsCount
label, in addition to hiding it, when no matches are found
Currently we're *only* hiding the label, but not actually resetting it until a new match is found. Obviously it's being hidden, but it seems that it really ought to be completely reset as well (since e.g. `PDFFindBar.reset` won't technically reset *all* state otherwise).
This commit is contained in:
parent
eff257b820
commit
cb0009dab4
1 changed files with 6 additions and 6 deletions
|
@ -151,15 +151,15 @@ class PDFFindBar {
|
|||
return; // No UI control is provided.
|
||||
}
|
||||
|
||||
// If there are no matches, hide the counter.
|
||||
if (!matchCount) {
|
||||
// If there are no matches, hide and reset the counter.
|
||||
this.findResultsCount.classList.add('hidden');
|
||||
return;
|
||||
this.findResultsCount.textContent = '';
|
||||
} else {
|
||||
// Update and show the match counter.
|
||||
this.findResultsCount.textContent = matchCount.toLocaleString();
|
||||
this.findResultsCount.classList.remove('hidden');
|
||||
}
|
||||
|
||||
// Create and show the match counter.
|
||||
this.findResultsCount.textContent = matchCount.toLocaleString();
|
||||
this.findResultsCount.classList.remove('hidden');
|
||||
}
|
||||
|
||||
open() {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue