Skip to content

Allow to define the range input step #72

@mably

Description

@mably

We are currently adding it as a custom step attribute to the image-compare element:

<image-compare step="5" ...

And then activate it after page load using some code similar to this:

once('image_compare', 'image-compare', context).forEach(function (element) {
  var range_input = element.shadowRoot.querySelector('input');
  if (range_input && parseInt(element.getAttribute('step')) > 1) {
    range_input.step = element.getAttribute('step');
  }
});

Could improve keyboard use in some cases.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions