From 59c477a8c8560fa12882c416eb55d2df0618b3ce Mon Sep 17 00:00:00 2001 From: Alexandre R D'anzi Date: Fri, 27 Mar 2026 23:58:20 +0100 Subject: [PATCH 1/3] fix deck jumping below recovery banner --- src/email-recovery.js | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) diff --git a/src/email-recovery.js b/src/email-recovery.js index 1e053d7..9714ea5 100644 --- a/src/email-recovery.js +++ b/src/email-recovery.js @@ -28,8 +28,26 @@ document.addEventListener('DOMContentLoaded', function() { // Use CSS class instead of inline styles for content-vue const contentVue = document.querySelector('#content-vue') if (contentVue) { + contentVue.classList.add('recovery-content-layout') contentVue.style.setProperty('--recovery-banner-height', topHeight) + /* + * Deck seems to reset class list, this restores 'recovery-content-layout' class name if another script removes it from classlist + */ + if (window.location.href.includes('apps/deck/')){ + var observer = new MutationObserver(function(mutations) { + mutations.forEach(function(mutation) { + if (mutation.type === "attributes" && mutation.attributeName === 'class') { + if (banner && !banner.classList.contains('recovery-banner-hidden') && !contentVue.classList.contains('recovery-content-layout')) { + contentVue.classList.add('recovery-content-layout') + } + } + }); + }); + observer.observe(contentVue, { + attributes: true + }); + } } } // added special case for bookmarks and passwords -- GitLab From 0672337d91a34069ff538c23465496b381c0f57c Mon Sep 17 00:00:00 2001 From: Alexandre R D'anzi Date: Sat, 28 Mar 2026 00:00:54 +0100 Subject: [PATCH 2/3] removing empty line --- src/email-recovery.js | 1 - 1 file changed, 1 deletion(-) diff --git a/src/email-recovery.js b/src/email-recovery.js index 9714ea5..6a9e9e7 100644 --- a/src/email-recovery.js +++ b/src/email-recovery.js @@ -28,7 +28,6 @@ document.addEventListener('DOMContentLoaded', function() { // Use CSS class instead of inline styles for content-vue const contentVue = document.querySelector('#content-vue') if (contentVue) { - contentVue.classList.add('recovery-content-layout') contentVue.style.setProperty('--recovery-banner-height', topHeight) /* -- GitLab From a84f8321458715b63ef6fd0f99ae7cc4ac7280ab Mon Sep 17 00:00:00 2001 From: Alexandre Roux Date: Mon, 30 Mar 2026 09:46:05 +0200 Subject: [PATCH 3/3] fix lint --- src/email-recovery.js | 20 ++++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) diff --git a/src/email-recovery.js b/src/email-recovery.js index 6a9e9e7..37df6a4 100644 --- a/src/email-recovery.js +++ b/src/email-recovery.js @@ -33,19 +33,19 @@ document.addEventListener('DOMContentLoaded', function() { /* * Deck seems to reset class list, this restores 'recovery-content-layout' class name if another script removes it from classlist */ - if (window.location.href.includes('apps/deck/')){ - var observer = new MutationObserver(function(mutations) { + if (window.location.href.includes('apps/deck/')) { + const observer = new MutationObserver(function(mutations) { mutations.forEach(function(mutation) { - if (mutation.type === "attributes" && mutation.attributeName === 'class') { - if (banner && !banner.classList.contains('recovery-banner-hidden') && !contentVue.classList.contains('recovery-content-layout')) { - contentVue.classList.add('recovery-content-layout') + if (mutation.type === 'attributes' && mutation.attributeName === 'class') { + if (banner && !banner.classList.contains('recovery-banner-hidden') && !contentVue.classList.contains('recovery-content-layout')) { + contentVue.classList.add('recovery-content-layout') + } } - } - }); - }); + }) + }) observer.observe(contentVue, { - attributes: true - }); + attributes: true + }) } } } -- GitLab