Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

MultimodalTextbox interactive=False doesn't work with the submit button #9967

Closed
1 task done
sthemeow opened this issue Nov 16, 2024 · 0 comments · Fixed by #10902
Closed
1 task done

MultimodalTextbox interactive=False doesn't work with the submit button #9967

sthemeow opened this issue Nov 16, 2024 · 0 comments · Fixed by #10902
Labels
bug Something isn't working

Comments

@sthemeow
Copy link
Contributor

sthemeow commented Nov 16, 2024

Describe the bug

When setting interactive=False with MultimodalTextbox, it doesn't disable the submit button.
The text entry and image upload button are disabled so the content cannot be changed, but the submission can still take place.

Have you searched existing issues? 🔎

  • I have searched and found no existing issues

Reproduction

import gradio as gr


def greet(a, c):
    return gr.MultimodalTextbox(interactive=False), a, c+1


with gr.Blocks() as demo:
    a = gr.MultimodalTextbox(interactive=True, show_label=False) 
    b = gr.Textbox(interactive=False, show_label=False)
    c = gr.Number(interactive=False, show_label=False) 
    a.submit(fn=greet, inputs=[a, c], outputs=[a, b, c])

if __name__ == "__main__":
    demo.launch()

Screenshot

image
image
image

I can still click the submit button multiple times after it is set to be non-interactive.

Logs

No response

System Info

Gradio Playground

Severity

I can work around it

@sthemeow sthemeow added the bug Something isn't working label Nov 16, 2024
lara-gfaria added a commit to lara-gfaria/gradio that referenced this issue Mar 28, 2025
…s were not disabled

In the MultimodalTextbox component, when interactive=False, the submit
button remained active allowing users to submit inputs without being able to edit them.
To fix this, I added restrictions to disable the submit, file upload and microphone
buttons when interactive=False.
lara-gfaria added a commit to lara-gfaria/gradio that referenced this issue Mar 28, 2025
…s were not disabled

In the MultimodalTextbox component, when interactive=False,
the submit button remained active allowing users to submit
inputs without being able to edit them. To fix this, I
added restrictions to disable the submit, file upload
and microphone buttons when interactive=False.
lara-gfaria added a commit to lara-gfaria/gradio that referenced this issue Mar 28, 2025
…s were not disabled

In the MultimodalTextbox component, when
interactive=False, the submit button remained
active allowing users to submit inputs without
being able to edit them. To fix this, I added
restrictions to disable the submit, file upload
and microphone buttons when interactive=False.
lara-gfaria added a commit to lara-gfaria/gradio that referenced this issue Mar 28, 2025
In the MultimodalTextbox component, when
interactive=False, the submit button remained
active allowing users to submit inputs without
being able to edit them. To fix this, I added
restrictions to disable the submit, file upload
and microphone buttons when interactive=False.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant