Skip to content

fix: prevent infinite resize loop with fill_height when footer_links=[]#13015

Closed
Ker102 wants to merge 1 commit intogradio-app:mainfrom
Ker102:fix/fill-height-infinite-grow
Closed

fix: prevent infinite resize loop with fill_height when footer_links=[]#13015
Ker102 wants to merge 1 commit intogradio-app:mainfrom
Ker102:fix/fill-height-infinite-grow

Conversation

@Ker102
Copy link
Copy Markdown

@Ker102 Ker102 commented Mar 13, 2026

Closing this — after further analysis I realized the height dedup approach doesn't actually stop the feedback loop, since box.bottom genuinely increases each cycle as the flex container stretches to fill the resized iframe. The core issue needs parentIFrame.size() to be skipped entirely when fill_height is true, not just deduplicated.

Sorry for the noise.

When fill_height=True and footer_links=[], the footer element is removed
from the DOM. The ResizeObserver fires handle_resize() which calls
parentIFrame.size() to tell the host iframe the content height. Without
the footer acting as a stable boundary, the flex container with
fill_height keeps growing to fill the new space, triggering the
ResizeObserver again in an infinite loop.

Fix: track the last reported height and skip parentIFrame.size() calls
when the computed height hasn't changed, breaking the feedback loop.

Fixes gradio-app#12992
@Ker102 Ker102 closed this Mar 13, 2026
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.

1 participant