Repository navigation
feat: keep modal actions out of the scrollable body - #3419
Merged
Merged
Conversation
Modals with more than the one store-driven confirm button used to opt out of the footer with `hideActions` and render their own copy of it inside the modal body. That body is the scroll container, so those buttons scrolled away with the content and sat on the wrong side of the border. `OcModal` now exposes its actions row as a teleport target, so a custom component keeps writing its buttons in its own template while they render in the real footer.
AlexAndBear
force-pushed
the
fix/modal-actions-outside-scroll-area
branch
from
September 22, 2026 08:55
9d9d52d to
4c2a1e7
Compare
The editor focused itself on mount, which is what the text editor app wants but not a form where it is one field among several: revealing the create-space options moved the focus off the space name, same for the banner details in the admin settings. `autofocus` opts out of it and defaults to the previous behaviour.
AlexAndBear
force-pushed
the
fix/modal-actions-outside-scroll-area
branch
from
September 22, 2026 09:26
87f626d to
e4a7ba6
Compare
JammingBen
approved these changes
Sep 22, 2026
2 of 7 tasks
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description
OcModalrenders one confirm button, driven by the modal store. A modal that needs a second or third button, or labels derived from its own state, had no way to express that — so seven of them sethideActions: trueand rendered their own copy of the footer markup inside the modal body instead.The body is the scroll container. Those buttons therefore belong to the scrolling content: they scroll out of view with long content, and they sit inside the body's padding rather than in the footer.
OcModalnow gives its actions row an id, and a custom component teleports its buttons in there. The buttons stay in the component's own template, with its own state and handlers — only where they render changes.Updated modals
CreateLinkModalCreateFolderModalCreateSpaceModalUnsavedChangesModalAppTokenModalResourceConflictModalDatePickerModalTheir dispatches move from
hideActions: truetohideConfirmButton: true, so the footer renders but stays empty until the component fills it. The ten remaininghideActions: truedispatches are modals with no actions at all (FilePickerModal,LocationPickerModal,EmojiPickerModal,SaveAsModal) and are unchanged.Notes for review
<teleport defer>is needed because the actions row renders after the body.deferis Vue 3.5+.CreateFolderModalandCreateSpaceModalsubmit a<form>. Their confirm button now sits outside it, so the form has an id and the button points at it withform, which keeps Enter submitting.teleportso the buttons render in place; without it they render nowhere and the assertions fail.Side note: a second commit stops a form's text editor from stealing the focus
useTextEditorfocused itself on mount for every non-readonly editor. That is what the text editor app wants, but not a form where the editor is one field among several — revealing the create-space options moved the focus off the space name.TextEditorOptionsgainsautofocus, defaulting to the previous behaviour, and the three places where the editor is not the first field opt out: the space description, the banner details in the admin settings, and the mail compose body (which sits after From, To, CC, BCC and Subject).Not unit tested: the editor spec mounts detached, so
isFocusedstays false whether or not the editor autofocuses, and a test would pass either way.Related Issue
How Has This Been Tested?
pnpm check:all(4142 unit tests), plus the create-folder modal checked manually against a local OpenCloud backendBackandContinue/CreateTypes of changes