Skip to content

Slider widgets misses value change with clicking when continuous update is False #3597

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

Open
imcovangent opened this issue Sep 21, 2022 · 3 comments
Milestone

Comments

@imcovangent
Copy link

Description

When a slider widget is used, one would expect that a value change is observed when the slider is clicked and when it is dragged. However, when continous_update is set to False, then a click on the slider to change the value is not observed.

Reproduce

  1. Make a jupyter notebook.
  2. Add slider widget in first cell:
from ipywidgets import widgets
test_sl = widgets.IntSlider(
        min=0,
        max=100,
        step=1,
        description="Test:",
        disabled=False,
        continuous_update=False,
        orientation="horizontal",
        readout=True,
        readout_format="d",
    )
display(test_sl)
  1. Show value of the slider in a second cell:
test_sl.value
  1. Drag slider to new value
  2. Rerun the second cell to see that the slider value is updated correctly.
  3. Now click on the slider to change the value
  4. Rerun the second cell to see that the slider value is not updated as expected.

Expected behavior

I would expect that the slider value is updated and observed if you click a slider, also when continuous updating is disabled.

Context

  • ipywidgets version 8.0.1
  • Operating System and version: Windows 10
  • Browser and version: Chrome
@ceriottm
Copy link

Hi! I also noticed this, which I'm pretty sure is a change in behavior relative to ipywidgets 7. Can anyone confirm whether this is deliberate or a regression?

@jasongrout
Copy link
Member

jasongrout commented Oct 18, 2022

Confirmed that I see the problem too. This looks like a regression to me. CC @ibdafna

Thanks for the clear reproduction.

@maartenbreddels
Copy link
Member

This is fixed in ipywidgets 8.0.4

maartenbreddels added a commit to maartenbreddels/ipywidgets that referenced this issue May 13, 2023
maartenbreddels added a commit to maartenbreddels/ipywidgets that referenced this issue May 13, 2023
maartenbreddels added a commit to maartenbreddels/ipywidgets that referenced this issue May 13, 2023
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

No branches or pull requests

4 participants