mirror of
https://github.com/willmiao/ComfyUI-Lora-Manager.git
synced 2026-08-07 22:40:14 -03:00
fix(ui): pin import modal action buttons with sticky footer
Make the import modal a flex column with a scrollable step area so the Back/Import buttons stay visible on short viewports (1080p / 150% zoom) instead of being cut off at the bottom of the scroll flow. Also reset step scroll positions via class since 'locationStep' has a duplicate id in the download modal template.
This commit is contained in:
@@ -1,4 +1,35 @@
|
||||
/* Import Modal Styles */
|
||||
|
||||
/* Sticky footer layout: fixed header, scrollable step content, pinned action buttons.
|
||||
Ensures Back/Import buttons stay visible on short viewports (e.g. 1080p or 150% zoom). */
|
||||
#importModal .modal-content {
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
overflow: hidden; /* The active step scrolls instead of the whole modal */
|
||||
}
|
||||
|
||||
#importModal .modal-header {
|
||||
flex-shrink: 0;
|
||||
}
|
||||
|
||||
#importModal .import-step {
|
||||
flex: 1 1 auto;
|
||||
min-height: 0; /* Allow the step to shrink and scroll within the flex container */
|
||||
overflow-y: auto;
|
||||
overflow-x: hidden;
|
||||
scrollbar-gutter: stable;
|
||||
}
|
||||
|
||||
#importModal .import-step .modal-actions {
|
||||
position: sticky;
|
||||
bottom: 0;
|
||||
z-index: 1;
|
||||
background: var(--lora-surface);
|
||||
border-top: 1px solid var(--lora-border);
|
||||
padding-top: var(--space-2);
|
||||
padding-bottom: var(--space-1);
|
||||
}
|
||||
|
||||
.import-step {
|
||||
margin: var(--space-2) 0;
|
||||
transition: none !important;
|
||||
|
||||
@@ -47,11 +47,11 @@ export class ImportStepManager {
|
||||
targetStep.offsetHeight;
|
||||
}
|
||||
|
||||
// Scroll modal content to top
|
||||
const modalContent = document.querySelector('#importModal .modal-content');
|
||||
if (modalContent) {
|
||||
modalContent.scrollTop = 0;
|
||||
}
|
||||
// Reset scroll via class: 'locationStep' has a duplicate ID in downloadModal's
|
||||
// template, so getElementById may not return the import modal's step.
|
||||
document.querySelectorAll('.import-step').forEach(step => {
|
||||
step.scrollTop = 0;
|
||||
});
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user