Skip to content

bug(mat-slider): ignores first press if value is bigger than max #23817

Closed

Description

@mkhodan

Reproduction

I created a simple demo to demonstrate the issue. There are an input and mat-slider(min: 0, max: 100, step: 20). Initial value is 40. When I input a value that is bigger than sliders max value and try to decrease it with keyboard(by switching to it with tab and pressing Left Arrow) it ignores my first click(In fact I guess it just aligns value to max).

Steps to reproduce:

  1. open stackblitz
  2. in the input type 120
  3. press tab
  4. press Arrow Left
  5. press Arrow Left Again

Expected Behavior

Value is decreased after each Arrow press

Actual Behavior

Value is changed only after second Arrow press, first click is ignored if input value is bigger than max value(which is 100)

Environment

  • Angular 12.2.9:
  • CDK/Material 12.2.9:
  • Browser(s): Chrome 95.0.4638.54 (Official Build) (64-bit)
  • Operating System (Reproducible both on Windows and Mac):

Activity

  1. added
    needs triage
    on Oct 22, 2021
  2. self-assigned this
    on Oct 24, 2021
  3. added
    P3
    and removed
    needs triage
    on Oct 24, 2021
  4. added a commit that references this issue on Oct 24, 2021
    115f2b3
  5. added 2 commits that reference this issue on Jan 13, 2022
    aa32621
    81528bc
  6. angular-automatic-lock-bot commented on Feb 13, 2022

    @angular-automatic-lock-bot

    This issue has been automatically locked due to inactivity.
    Please file a new issue if you are encountering a similar or related problem.

    Read more about our automatic conversation locking policy.

    This action has been performed automatically by a bot.

  7. locked and limited conversation to collaborators on Feb 13, 2022
  8. added a commit that references this issue on Apr 3, 2022
    6cc1bd4
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

P3area: material/slider

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions