Skip to content

If md-slider changes position after initialization, it can't be clicked in the new location #1845

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

Closed
alxhub opened this issue Nov 12, 2016 · 5 comments
Assignees

Comments

@alxhub
Copy link
Member

alxhub commented Nov 12, 2016

Bug, feature request, or proposal:

Bug

What is the expected behavior?

If md-slider changes position on the page after initialization (e.g. if an NgIf becomes true and more elements appear), it should be usable in the new position.

What is the current behavior?

If md-slider changes position on the page after initialization , clicking the slider bar will not work. Clicking the handle results in the handle being rendered far to the right of the mouse pointer.

What are the steps to reproduce?

In plunker: http://plnkr.co/edit/dAKSvx6Evjpz1Z5D2DQ7?p=preview

Load the plunk, wait for the hidden content to be shown after 1s timer. Then, try to use the slider.

What is the use-case or motivation for changing an existing behavior?

It's horribly broken!

Which versions of Angular, Material, OS, browsers are affected?

Unknown, but would guess plunker is using the latest.

Is there anything else we should know?

Feel free to ask me to show you the issue in my real app. :)

@crisbeto
Copy link
Member

There was a change, at some point, that made the slider get the dimensions on mouse enter, instead of on init. Might be worth updating since it looks like the Material version in the Plunker template is old.

@DSchrupert
Copy link

Looks like @crisbeto is correct. After updating the systemjs.config.js to:
'@angular/material': 'https://unpkg.com/@angular/[email protected]',
resolves this issue when i tried.

@jelbourn
Copy link
Member

@mmalerba can you investigate?

@mmalerba
Copy link
Contributor

yeah, this was fixed by #1663

@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 Sep 5, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

5 participants