Closing `gr.Accordion` doesn't update the vertical length in Spaces

Hi to whoever is reading this! :hugs:

I’ve been running some experiments using gr.Accordion and it was working fine so far, when deploying it locally via Gradio. But when uploading the same code into HuggingFace Spaces, it seems that when opening a gr.Accordion and then closing it, doesn’t update the vertical length of the page, so one’s still able to scroll down as if the gr.Accordion was opened.

To reproduce:

  • Create a HuggingFace Space with Gradio
  • Add the following code:
    import gradio as gr
    with gr.Blocks() as demo:
      with gr.Accordion("Demo", open=False):
        for _ in range(100):
  • Then open the gr.Accordion in the UI, and close it.

Thanks in advance!

This post was flagged by the community and is temporarily hidden.