elegantthemes / Divi-Beta

8 stars 0 forks source link

Range Field Step Attribute No Longer Working #109

Open dtcblyth opened 3 weeks ago

dtcblyth commented 3 weeks ago

Related Thread: https://discord.com/channels/1041765492907589683/1300637849623859284

The Problem:

The range field’s step attribute no longer seems to work. Regardless of the attribute value, the range slider and arrows always increase and decrease the value by 1 unit.

Last Working Version

The last working version was the very first Pub-Alpha – version 5.0.0-public-alpha ( updated 09-26-2024 )

Steps To Recreate:

  1. Add a Circle Counter module to the page.
  2. Go to Settings > Design > Circle > Circle Background Opacity.
  3. Adjust the setting value with the slider and arrows.

The field definition for the Circle Background Opacity setting is shown below.

"backgroundOpacity": {
  "attrName": "circle.advanced.background",
  "subName": "opacity",
  "label": "Circle Background Opacity",
  "description": "Decrease the opacity of the unfilled space of the circle to make the color fade into the background.",
  "groupName": "divi/background",
  "priority": 15,
  "render": true,
  "defaultAttr": {
    "desktop": {
      "value": {
        "opacity": "0.1"
      }
    }
  },
  "component": {
    "type": "field",
    "name": "divi/range",
    "props": {
      "allowedUnits": [

      ],
      "defaultUnit": "",
      "minLimit": 0.1,
      "max": 1,
      "step": 0.05
    }
  }
}

As you can see, the step value is set to 0.05 units, and yet the field steps by 1 unit. This problem also affects range fields in third-party modules.