ipywidgets
ipywidgets copied to clipboard
Slider widgets misses value change with clicking when continuous update is False
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
- Make a jupyter notebook.
- 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)
- Show value of the slider in a second cell:
test_sl.value
- Drag slider to new value
- Rerun the second cell to see that the slider value is updated correctly.
- Now click on the slider to change the value
- 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