Skip to content

bug(Slider): Tick marks don't align with the position of the thumb #29409

@jonancastelo

Description

@jonancastelo

Is this a regression?

  • Yes, this behavior used to work in the previous version

The previous version in which this bug was not present was

No response

Description

There are some values of "min", "max" and "step" together with "showTickMars" that make tick marks to dm't be aligned with the position of the thumb.

In the shared stackblitz example can be seen that:

  • The last tick mark is not displayed in the end of the slider.
  • As you approach the last point with the thumb the distance between thumb and tick marks is bigger .

Reproduction

StackBlitz link: https://stackblitz.com/edit/components-issue-t6k1kc
Steps to reproduce:

  1. Visually appreciate that last tick doesn't coincide with end of slider.
  2. Move the thumb to appreciate that as you approach to the end th distance between thumb and tick marks is bigger.

Expected Behavior

  • First and last tick mars should be displayed in the start and end of the slider.
  • The thumb should coincide with tick marks.

Actual Behavior

  • The last tick mark is not displayed in the end of the slider.
  • As you approach the last point with the thumb the distance between thumb and tick marks is bigger .

Environment

  • Angular: 16.2.1
  • CDK/Material: 16.2.1
  • Browser(s): Chrome
  • Operating System (e.g. Windows, macOS, Ubuntu): Mac

Metadata

Metadata

Assignees

No one assigned

    Labels

    P3An issue that is relevant to core functions, but does not impede progress. Important, but not urgentarea: material/slider

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions