The range-slider-element implementation conflicts with step validation for range inputs. Instead of validating steps relative to the min attribute (the step base), it validates relative to 0.
This causes range sliders to snap to incorrect values when min is not a multiple of step, violating the HTML5 specification and providing unexpected user experience.
Create a slider using these attributes:
$form['slider'] = [
'#type' => 'range_slider',
'#min' => 5,
'#max' => 30,
'#step' => 2,
'#default_value' => 6,
];
See if the issue can be fixed upstream first https://github.com/andreruffert/range-slider-element/pull/210
Active
3.0
Code
Not all content is available!
It's likely this issue predates Contrib.social: some issue and comment data are missing.