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
@ -151,15 +151,15 @@ class PDFFindBar {
|
|||||||
return; // No UI control is provided.
|
return; // No UI control is provided.
|
||||||
}
|
}
|
||||||
|
|
||||||
// If there are no matches, hide the counter.
|
|
||||||
if (!matchCount) {
|
if (!matchCount) {
|
||||||
|
// If there are no matches, hide and reset the counter.
|
||||||
this.findResultsCount.classList.add('hidden');
|
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() {
|
open() {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user