Skip to content
This repository was archived by the owner on Jan 13, 2025. It is now read-only.
This repository was archived by the owner on Jan 13, 2025. It is now read-only.

[mdc-slider] change event always firing on mousup or keypress #5018

@devversion

Description

@devversion

Bug report

Steps to reproduce

  1. Go to https://material-components.github.io/material-components-web-catalog/#/component/slider

  2. Open dev-tools

  3. Select the slider demo element

  4. Enter the following into the console: $0.addEventListener('MDCSlider:change',d => console.error('Change event'));

  5. Click on the slider thumb multiple times (preferably on the most left; so that the value can't change). Notice that the change event still emits without value change.

  6. Press left arrow until you are at value = 0. Notice that if you continue pressing left arrow keys the change event is still emitted.

Actual behavior

Change event always fires. Even if value didn't change.

Expected behavior

Change event only fires if there is a "change". Ideally the "change" event would follow native-input event semantics and only fire

Software Version(s)
MDC Web ^4.0.0-alpha.0
Browser Chrome
Operating System Windows

Related to angular/components#16795

Metadata

Metadata

Assignees

No one assigned

    Labels

    Unresolved (Archived)Open and unresolved issues and PRs that were closed due to archiving the repository.backlogbug

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions