Step Validation Bug

Created on 21 September 2025, 18 days ago

Problem/Motivation

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.

Steps to reproduce

Create a slider using these attributes:

   $form['slider'] = [
     '#type' => 'range_slider',
     '#min' => 5,
     '#max' => 30,
     '#step' => 2,
     '#default_value' => 6,
   ];

Proposed resolution

See if the issue can be fixed upstream first https://github.com/andreruffert/range-slider-element/pull/210

Remaining tasks

User interface changes

API changes

Data model changes

🐛 Bug report
Status

Active

Version

3.0

Component

Code

Created by

🇧🇪Belgium baikho Antwerp, BE

Live updates comments and jobs are added and updated live.
Sign in to follow issues

Merge Requests

Comments & Activities

Not all content is available!

It's likely this issue predates Contrib.social: some issue and comment data are missing.

Production build 0.71.5 2024