You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Choosing a value from the dropdown is causing the underlying slider to trigger a mouseup event. To fix this, we probably need to apply event.stopPropagation(). In the provided video, I added an event handler to the slider to illustrate the problem
Have you searched existing issues? 🔎
I have searched and found no existing issues
Reproduction
importgradioasgrdefhandle_slider_change(slider_value):
print(f"Slider value changed to: {slider_value}")
returnslider_valuedefhandle_dropdown_change(dropdown_value):
print(f"Dropdown value changed to: {dropdown_value}")
returndropdown_valuewithgr.Blocks() asdemo:
dropdown=gr.Dropdown(
choices= ["Option 1", "Option 2", "Option 3", "Option 4", "Option 5"],
label="Select an option",
value="Option 1"
)
slider=gr.Slider(minimum=0, maximum=100, step=1, label="Select a value", value=50)
dropdown.change(handle_dropdown_change, inputs=dropdown)
slider.release(handle_slider_change, inputs=slider)
demo.launch()
Screenshot
Screencast.from.10-09-24.13_37_18.webm
Logs
No response
System Info
Gradio Environment Information:
------------------------------
Operating System: Linux
gradio version: 4.43.0
gradio_client version: 1.3.0
------------------------------------------------
gradio dependencies in your environment:
aiofiles: 23.2.1
anyio: 4.4.0
fastapi: 0.112.1
ffmpy: 0.4.0
gradio-client==1.3.0 is not installed.
httpx: 0.27.0
huggingface-hub: 0.24.6
importlib-resources: 6.4.4
jinja2: 3.1.4
markupsafe: 2.1.5
matplotlib: 3.9.2
numpy: 1.26.4
orjson: 3.10.7
packaging: 24.1
pandas: 2.2.2
pillow: 10.4.0
pydantic: 2.8.2
pydub: 0.25.1
python-multipart: 0.0.9
pyyaml: 6.0.2
ruff: 0.6.2
semantic-version: 2.10.0
tomlkit==0.12.0 is not installed.
typer: 0.12.4
typing-extensions: 4.12.2
urllib3: 2.2.2
uvicorn: 0.30.6
authlib; extra == 'oauth' is not installed.
itsdangerous; extra == 'oauth' is not installed.
gradio_client dependencies in your environment:
fsspec: 2024.6.1
httpx: 0.27.0
huggingface-hub: 0.24.6
packaging: 24.1
typing-extensions: 4.12.2
websockets: 12.0
Severity
Blocking usage of gradio
The text was updated successfully, but these errors were encountered:
Describe the bug
Choosing a value from the dropdown is causing the underlying slider to trigger a
mouseup
event. To fix this, we probably need to applyevent.stopPropagation()
. In the provided video, I added an event handler to the slider to illustrate the problemHave you searched existing issues? 🔎
Reproduction
Screenshot
Screencast.from.10-09-24.13_37_18.webm
Logs
No response
System Info
Severity
Blocking usage of gradio
The text was updated successfully, but these errors were encountered: