Closed
Conversation
The $effect that synced range_input.value directly conflicted with bind:value, causing value clamping against stale min/max attributes. This led to infinite update loops when slider properties (visibility, range) were updated via callbacks. Three fixes: - Remove redundant range_input.value set (bind:value handles this) - Guard against range_input being undefined when visible=false - Use untrack for old_value write to prevent unnecessary effect re-runs - Reorder min/max attributes before bind:value to prevent clamping Fixes #12995 Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Collaborator
🪼 branch checks and previews
Install Gradio from this PR pip install https://gradio-pypi-previews.s3.amazonaws.com/546f26af7f35634ac424821d2e8a85a2f99b9739/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@546f26af7f35634ac424821d2e8a85a2f99b9739#subdirectory=client/python"Install Gradio JS Client from this PR npm install https://gradio-npm-previews.s3.amazonaws.com/546f26af7f35634ac424821d2e8a85a2f99b9739/gradio-client-2.1.0.tgz |
Collaborator
🦄 change detectedThis Pull Request includes changes to the following packages.
|
Collaborator
Author
|
testing kumquat but forgot to update branch |
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.
Summary
range_input.valuedirect DOM write that conflicted with Svelte'sbind:value, causing value clamping against stale min/max and triggering infinite update loopsrange_inputreactive ($state) so the CSS progress effect re-runs when the element becomes available after visibility toggleuntrackforold_valuewrite in change detection effect to prevent unnecessary re-runsmin/maxattributes beforebind:valueon the range input to prevent browser clampingTest plan
Slider.test.ts- 2/2)gr.update(visible=True))gr.Slider(...)constructor)Closes #12995
🤖 Generated with Claude Code