зеркало из https://github.com/mozilla/gecko-dev.git
Bug 1675483, only hide sheet count when the preview is loading to avoid flicker r=sfoster
Differential Revision: https://phabricator.services.mozilla.com/D96088
This commit is contained in:
Родитель
fd77d8d2c9
Коммит
a279a44108
|
@ -80,7 +80,7 @@ body[loading] #print {
|
||||||
margin: 0;
|
margin: 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
body[rendering] #sheet-count,
|
#sheet-count[loading],
|
||||||
body[invalid] #sheet-count {
|
body[invalid] #sheet-count {
|
||||||
visibility: hidden;
|
visibility: hidden;
|
||||||
}
|
}
|
||||||
|
|
|
@ -2206,6 +2206,12 @@ class PageCount extends PrintUIControlMixin(HTMLElement) {
|
||||||
document.l10n.setAttributes(this, "printui-sheets-count", {
|
document.l10n.setAttributes(this, "printui-sheets-count", {
|
||||||
sheetCount: this.sheetCount * this.numCopies,
|
sheetCount: this.sheetCount * this.numCopies,
|
||||||
});
|
});
|
||||||
|
|
||||||
|
// The loading attribute must be removed on first render
|
||||||
|
if (this.hasAttribute("loading")) {
|
||||||
|
this.removeAttribute("loading");
|
||||||
|
}
|
||||||
|
|
||||||
if (this.id) {
|
if (this.id) {
|
||||||
// We're showing the sheet count, so let it describe the dialog.
|
// We're showing the sheet count, so let it describe the dialog.
|
||||||
document.body.setAttribute("aria-describedby", this.id);
|
document.body.setAttribute("aria-describedby", this.id);
|
||||||
|
|
Загрузка…
Ссылка в новой задаче