From 3864969204e53c2ca0190f58f453909a8eefbf8d Mon Sep 17 00:00:00 2001 From: Skyler Grey Date: Wed, 5 Nov 2025 12:07:00 +0000 Subject: [PATCH] fix(mobile): update resized frame ID When resizing the frame on mobile we correctly resize the outer
element. We used to also resize the frame, but in ba45233bf (chore: refactor iframes to load collabora directly, 2023-06-11) the ID of the iframe was changed without things that depended on it also changing. In Chrome, this causes the issue that the iframe isn't resized all the way down, leading to it being possible to scroll the iframe inside the viewport. This is bad as it means some elements of Collabora Online that are meant to be stuck to different parts of the screen can go off the screen edge. There are some bits of CSS which also refer to this ID. To aid in easy partial reverting (and as I don't currently have a need for them) I have not fixed them in this commit Signed-off-by: Skyler Grey --- src/helpers/mobileFixer.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/helpers/mobileFixer.js b/src/helpers/mobileFixer.js index 645b32ad4..2de2cd1ba 100644 --- a/src/helpers/mobileFixer.js +++ b/src/helpers/mobileFixer.js @@ -17,8 +17,8 @@ const handleScrollReset = () => { // see https://developer.mozilla.org/en-US/docs/Web/API/VisualViewport const handleResize = () => { const expectedHeight = window.visualViewport.height ?? document.documentElement.clientHeight - const frame = document.getElementById('richdocumentsframe') - if (frame) { + const frames = document.getElementsByClassName('office-viewer__iframe') + for (const frame of frames) { frame.style.maxHeight = expectedHeight + 'px' } const viewer = document.querySelector('.office-viewer')