Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

bug(slider): Basic and Range Slider do no render properly inside MatDialog, when EnterAnimationDuration > 0 #26043

Closed
1 task
Hemki opened this issue Nov 21, 2022 · 2 comments
Assignees
Labels
area: material/slider P2 The issue is important to a large percentage of users, with a workaround

Comments

@Hemki
Copy link

Hemki commented Nov 21, 2022

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

The Angular Material Slider Component's Thumb doesn't render properly inside a Dialog Component when the default animation isn't deactivated.

The Slider Thumb (both within Basic Slider as well as Range Slider) is not rendered at the correct location, but instead 20% to the left, when placed inside the Dialog Component without disabling its (default) enterAnimation.

Depending on the slider's size, this can be quite noticable. The Slider Component should behave identically whether being placed in a Dialog Component with Animation enabled or not.
Disabling the Dialog's enterAnimation fixes the issue.

Please take a look at my Stackblit bug reproduction (or alternatively as Application URL).

Reproduction

Stackblit bug reproduction (or alternatively as Application URL).

Steps to reproduce:

  1. Open MatDialog without disabling default enter Animation
  2. Within said Dialog, place the Slider Component
  3. Both basic slider and range slider will have missplaced thumbs (20% to the left of its intended value)

Bildschirm­foto 2022-11-21 um 23 31 25

Expected Behavior

The Slider Component's Thumb should be rendered at its correct location, given by its value.

Actual Behavior

The Slider Component's Thumb is rendered approx. 20% to the left of its intended place.

Environment

  • Angular: 15.0.0
  • CDK/Material: 15.0.0
  • Browser(s): Chrome, Safari, Firefox
  • Operating System (e.g. Windows, macOS, Ubuntu): Tested on macOS
@Hemki Hemki added the needs triage This issue needs to be triaged by the team label Nov 21, 2022
@wagnermaciel wagnermaciel added P2 The issue is important to a large percentage of users, with a workaround area: material/slider labels Nov 21, 2022
@wagnermaciel wagnermaciel self-assigned this Nov 21, 2022
@wagnermaciel wagnermaciel removed the needs triage This issue needs to be triaged by the team label Nov 21, 2022
wagnermaciel added a commit to wagnermaciel/components that referenced this issue Nov 21, 2022
wagnermaciel added a commit to wagnermaciel/components that referenced this issue Nov 22, 2022
@csvn
Copy link
Contributor

csvn commented Nov 25, 2022

I think I encountered the same issue. My slider uses steps and is rendered inside a MatDialog.
As soon as a user interacts with it, the thumb pops off to the end of the track like it should.

image
image

I see that there is already a fix in progress though. Let's hope it's merged and that there's a patch release soon 🤞😇

wagnermaciel added a commit that referenced this issue Nov 26, 2022
@mmalerba mmalerba removed the has pr label Dec 8, 2022
@angular-automatic-lock-bot
Copy link

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.

@angular-automatic-lock-bot angular-automatic-lock-bot bot locked and limited conversation to collaborators Jan 8, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
area: material/slider P2 The issue is important to a large percentage of users, with a workaround
Projects
None yet
Development

No branches or pull requests

5 participants