fix: prevent infinite vertical growth when footer_links=[]#13006
Closed
giulio-leone wants to merge 2 commits intogradio-app:mainfrom
Closed
fix: prevent infinite vertical growth when footer_links=[]#13006giulio-leone wants to merge 2 commits intogradio-app:mainfrom
footer_links=[]#13006giulio-leone wants to merge 2 commits intogradio-app:mainfrom
Conversation
When `footer_links=[]`, the footer element is not rendered but the `.wrap` container uses `min-height: 100%` with no upper bound. Combined with `main.contain`'s `flex-grow: 1` and fill_height's `scale: 1` on the root column, this creates a feedback loop where the container keeps growing beyond the viewport. Fix: when in app_mode with no footer, cap the container at `100vh` and enable overflow scrolling so content doesn't push the container beyond the viewport. Fixes #12992 Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Collaborator
🪼 branch checks and previews
Install Gradio from this PR pip install https://gradio-pypi-previews.s3.amazonaws.com/4f4cc6a54017228fd7a8bea02643c659df1d5113/gradio-6.9.0-py3-none-any.whlInstall Gradio Python Client from this PR pip install "gradio-client @ git+https://github.com/gradio-app/gradio@4f4cc6a54017228fd7a8bea02643c659df1d5113#subdirectory=client/python"Install Gradio JS Client from this PR npm install https://gradio-npm-previews.s3.amazonaws.com/4f4cc6a54017228fd7a8bea02643c659df1d5113/gradio-client-2.1.0.tgz |
Collaborator
🦄 change detectedThis Pull Request includes changes to the following packages.
|
This was referenced Mar 13, 2026
Collaborator
|
Hi @giulio-leone ! This does not fix the issue: https://huggingface.co/spaces/freddyaboulton/infinite_space . I installed the wheel from this pr in a space and I see the same problem. I will close this because we've seen a lot of ai-generated prs that are not properly tested. We would more than happy to review this once you can demonstrate it fixes the issue! |
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
Fixes the infinite vertical growth bug when launching with
footer_links=[].Problem
When
footer_links=[], the footer element is not rendered. The.wrapcontainer usesmin-height: 100%(in app_mode) with no upper bound. Combined with:main.contain'sflex-grow: 1scale: 1(fromfill_height)This creates a feedback loop: container grows → column grows → container grows → infinite.
The footer normally acts as a natural bottom anchor that prevents this. Without it, nothing constrains the flex expansion.
Solution
When in
app_modewith no footer (footer_links.length === 0):max-height: 100vhto cap the container at the viewport heightoverflow: autoto enable scrolling if content exceeds the viewportThis only applies when the footer is absent — normal behavior is unchanged.
Reproduction
Live demo: https://huggingface.co/spaces/Carbaz/infinite_space
Closes #12992