ipywidgets icon indicating copy to clipboard operation
ipywidgets copied to clipboard

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

Open imcovangent opened this issue 2 years ago • 0 comments

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

imcovangent avatar Sep 21 '22 15:09 imcovangent