Bento, the office suite that fits in a file
TypeScript mit-licenseofficeoffice-365office-suiteoffice-toolsoffice365open-sourcepowerpointself-hostedsingle-page-appslidesslideshareslideshowslideshow-galleryslideshow-makerslideshows
The faded backup tag no longer holds the title's space (#258)
Anas Bouzidbc7d77b0ddd6
diff --git a/slides/src/editor/editor.ts b/slides/src/editor/editor.tsindex 0cdf061e..02cbae51 100644--- a/slides/src/editor/editor.ts+++ b/slides/src/editor/editor.ts@@ -2496,13 +2496,21 @@ export class Editor {}private savedTimer = 0+ private savedHideTimer = 0private flashSaved(message = t('Saved')) {let tag = document.querySelector<HTMLElement>('.ed-autosaved')if (!tag) { tag = div('ed-autosaved'); document.querySelector('.ed-topbar .ed-title')?.after(tag) }tag.textContent = message+ // hidden while idle: at opacity 0 the tag still held its width, so after+ // the first backup the title permanently lost the space this text needs+ tag.hidden = false+ void tag.offsetWidth // paint a frame at opacity 0 so the fade-in runstag.classList.add('show')clearTimeout(this.savedTimer)+ clearTimeout(this.savedHideTimer)this.savedTimer = window.setTimeout(() => tag!.classList.remove('show'), 1400)+ // leave layout only after the 0.25s fade-out has finished+ this.savedHideTimer = window.setTimeout(() => { tag!.hidden = true }, 1700)}async save(forcePicker: boolean) {