mirror of
https://github.com/zen-browser/pdf.js.git
synced 2025-07-08 01:10:08 +02:00
[Generic viewer] Re-factor how the notFound
appearance is set on the "findInput" in the PDFFindBar
Rather than having two slightly different ways of setting the pending/notFound appearance on the "findInput", we can simply use "data-status" in both cases since they're obviously mutually exclusive.
This commit is contained in:
parent
956fcab967
commit
313ee28436
2 changed files with 4 additions and 8 deletions
|
@ -104,7 +104,6 @@ class PDFFindBar {
|
|||
}
|
||||
|
||||
updateUIState(state, previous, matchesCount) {
|
||||
let notFound = false;
|
||||
let findMsg = "";
|
||||
let status = "";
|
||||
|
||||
|
@ -118,7 +117,7 @@ class PDFFindBar {
|
|||
|
||||
case FindState.NOT_FOUND:
|
||||
findMsg = this.l10n.get("find_not_found", null, "Phrase not found");
|
||||
notFound = true;
|
||||
status = "notFound";
|
||||
break;
|
||||
|
||||
case FindState.WRAPPED:
|
||||
|
@ -137,8 +136,6 @@ class PDFFindBar {
|
|||
}
|
||||
break;
|
||||
}
|
||||
|
||||
this.findField.classList.toggle("notFound", notFound);
|
||||
this.findField.setAttribute("data-status", status);
|
||||
|
||||
Promise.resolve(findMsg).then(msg => {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue