Repository navigation
intropage: fix page wheel-scroll over chart panels and Panel Details overflow - #429
Merged
Merged
Conversation
…overflow resizeCharts() sized every chart from .panel_wrapper height - 30, a formula from the pre-card layout. .panel_wrapper now holds the 34px card header and padded body, so charts came out ~19px taller than their chart_wrapper and overflowed .ccCardBody. cards.css gives the body overflow-x: auto, which makes overflow-y auto as well, so each chart panel became a tiny nested scroller that captured the mouse wheel and the page would not scroll. Pie/treemap charts (no fixed wrapper height) also grew ~18px on every window resize. Keep the server-sized chart height, and stop card bodies from scrolling vertically (cards already grow to fit their content). Themes such as deepness force .ui-dialog-content to overflow: visible, so long Panel Details content spilled under the Close button pane with no scrollbar. Restore overflow: auto on the details dialog content (with clear: both so the new BFC is not squeezed beside the floated title that overhangs the fixed-height titlebar) and cap the dialog to the viewport. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
|
Contributor
There was a problem hiding this comment.
🔵 Needs a closer look
Chart-height preservation depends on chart-library sizing behavior that remains unverified across supported Cacti versions and needs human confirmation.
No open issues 🎉
What changed in this PR
Fixes dashboard scrolling and Panel Details overflow following the shared card layout update.
Changes:
- Preserves chart height during resizing to avoid nested scrolling and repeated chart growth.
- Disables vertical scrolling within card bodies and restores scrolling inside the details dialog.
- Caps the details dialog height to the viewport and documents the fixes.
| File | Description |
|---|---|
includes/intropage.js |
Preserves chart height and limits details dialog height. |
css/common.css |
Prevents card-body vertical scrolling and contains dialog overflow. |
CHANGELOG.md |
Records both scrolling fixes. |
Review effort: Balanced
bmfmancini
approved these changes
Oct 22, 2026
xmacan
approved these changes
Oct 22, 2026
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.



Summary
Fixes two scrolling problems on the Intropage dashboard.
1. Page will not scroll with the mouse wheel over chart panels
resizeCharts()sized every chart as.panel_wrapperheight − 30, a formula from the pre-card layout. Since the shared card chrome (#423),.panel_wrappercontains the 34px.ccCardHeaderplus the padded.ccCardBody, so each chart rendered ~19px taller than itschart_wrapperand overflowed the card body.cards.cssgives.ccCardBodyoverflow-x: auto, which implicitly makesoverflow-yautotoo, so every chart panel became a tiny nested scroller. A wheel gesture over it latched onto that scroller and the page did not move. The same formula also made pie/treemap charts (no fixed wrapper height) grow ~18px on every window resize.includes/intropage.js:resizeCharts()keeps the chart's server-sized height ($(this).height()) and only adapts the width.css/common.css:#panel_container .ccCardBody { overflow-y: hidden; }. Cards already grow to fit their content, so the body never needs its own vertical scroller.2. Panel Details content spills into the Close button pane and cannot scroll
Themes such as deepness set
.ui-dialog .ui-dialog-content { overflow: visible }, so long details overflowed the dialog under the button pane with no scrollbar.css/common.css:.ui-dialog #overlay.ui-dialog-content { overflow: auto; clear: both; }. Theclear: bothis needed because, as deepness's own comment warns,overflow: autocreates a BFC that gets squeezed (to ~40px wide) beside the floated.ui-dialog-title, which overhangs the fixed 28px titlebar by 1px.includes/intropage.js: cap the details dialogmaxHeightto the viewport (Math.min(650, window height - 40)).Testing
Reproduced and verified in a throwaway Cacti 1.2.32 install (deepness theme, 1380×768, 28 panels, 90 devices) driven through a real browser:
resizeevents grew the Data Sources pie card to 510px. After: it stays at 229px.No PHP changes; the CHANGELOG is updated.