JuliaPluto / PlutoUI.jl

https://featured.plutojl.org/basic/plutoui.jl
The Unlicense
299 stars 54 forks source link

Slider default value is rounded if range is large #241

Open juliohm opened 1 year ago

juliohm commented 1 year ago

image

ederag commented 1 year ago

Looks like the value is rounded (from the slider position in pixel ?), rather than ignored Screenshot_20221229_190936

disberd commented 1 year ago

It appears the mdn docs also specify that the html input range is not precise and should not be used when the exact value is important: https://developer.mozilla.org/en-US/docs/Web/HTML/Element/input/range

I guess for most use cases the widget is indeed used with a smaller step span

ederag commented 1 year ago

@disberd Thanks, that makes it very clear. Could it be possible to take the initial value not from a round trip through the slider position, but rather directly from the initial value ? (It should be possible, just as keyboard arrows allow to increment values exactly)