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:
Jonas Jenwald 2017-07-05 11:19:29 +02:00
parent eff257b820
commit cb0009dab4

View File

@ -151,16 +151,16 @@ 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;
}
// Create and show the match counter.
this.findResultsCount.textContent = '';
} else {
// Update and show the match counter.
this.findResultsCount.textContent = matchCount.toLocaleString();
this.findResultsCount.classList.remove('hidden');
}
}
open() {
if (!this.opened) {