Skip to content

Allow to define the range input step #72

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.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions