Skip to content

Fix: Table question's columns panel forces the whole page to scroll w… - #52

Open
UncleTomsCabi wants to merge 1 commit into
pluginsGLPI:mainfrom
UncleTomsCabi:fix/table-config-scroll
Open

Fix: Table question's columns panel forces the whole page to scroll w…#52
UncleTomsCabi wants to merge 1 commit into
pluginsGLPI:mainfrom
UncleTomsCabi:fix/table-config-scroll

Conversation

@UncleTomsCabi

Copy link
Copy Markdown

…ith many columns

Problem

When a Table question has enough columns to overflow the viewport (reproduced with 7 columns), reaching the last ones requires scrolling the whole page instead of just the columns panel. Because the panel is a Bootstrap dropdown menu, scrolling the page while it stays open can make it jump back to the top instead of staying anchored to its toggle button, making it effectively impossible to configure columns past a certain point.

Fix

Give the columns container its own scroll (max-height: 60vh; overflow-y: auto) instead of letting it grow past the viewport. The "Add column" button stays outside the scrollable area and is always visible.

Testing

Added a regression test (TableQuestionAdminConfigRenderingTest) asserting that the rendered admin template's columns container carries both overflow-y: auto and a max-height constraint — a bare overflow-y: auto with no height limit never actually scrolls, so both are checked together.

…ith many columns

## Problem

When a `Table` question has enough columns to overflow the viewport
(reproduced with 7 columns), reaching the last ones requires scrolling
the whole page instead of just the columns panel. Because the panel is a
Bootstrap dropdown menu, scrolling the page while it stays open can make
it jump back to the top instead of staying anchored to its toggle button,
making it effectively impossible to configure columns past a certain
point.

## Fix

Give the columns container its own scroll (`max-height: 60vh;
overflow-y: auto`) instead of letting it grow past the viewport. The
"Add column" button stays outside the scrollable area and is always
visible.

## Testing

Added a regression test (`TableQuestionAdminConfigRenderingTest`)
asserting that the rendered admin template's columns container carries
both `overflow-y: auto` and a `max-height` constraint — a bare
`overflow-y: auto` with no height limit never actually scrolls, so both
are checked together.
@Rom1-B
Rom1-B self-requested a review August 24, 2026 12:26
Comment thread CHANGELOG.md

### Fixed

- Fixed the `Table` question's columns configuration panel: with enough columns to overflow the viewport, reaching the last ones required scrolling the whole page, which could make the still-open dropdown menu jump back to the top instead of staying anchored to its toggle button. The panel now scrolls on its own

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@UncleTomsCabi Entry is too long for a changelog line; shorten to the gist of the fix.

Suggested change
- Fixed the `Table` question's columns configuration panel: with enough columns to overflow the viewport, reaching the last ones required scrolling the whole page, which could make the still-open dropdown menu jump back to the top instead of staying anchored to its toggle button. The panel now scrolls on its own
- Fixed the `Table` question's columns configuration panel forcing the whole page to scroll instead of scrolling on its own

@Rom1-B
Rom1-B requested a review from stonebuzz August 24, 2026 12:48
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants