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

mdOption: ripple blocks hover styles and events on parent's child #4480

Closed
epelc opened this issue May 11, 2017 · 2 comments · Fixed by #4503
Closed

mdOption: ripple blocks hover styles and events on parent's child #4480

epelc opened this issue May 11, 2017 · 2 comments · Fixed by #4503
Assignees
Labels
P3 An issue that is relevant to core functions, but does not impede progress. Important, but not urgent

Comments

@epelc
Copy link
Contributor

epelc commented May 11, 2017

Bug, feature request, or proposal:

If you have a ripple on a component and add a child inside that component, the child can not have hover events or styles applied to it directly(you must apply to the parent). This is because the ripple is position: absolute; when it is not active(not doing the animation) and it covers the entire parent.

What is the expected behavior?

Ripples should allow hover effects and event listeners to work on a parents child without css/js hacks and workarounds.

What is the current behavior?

The ripple blocks this because of it's styles when it is not active.

What are the steps to reproduce?

I believe this can be triggered with any ripple but I specifically encountered it with a custom md-option that had a component inside which listens for hover events. This also happens when trying to apply css affects.

Providing a Plunker (or similar) is the best way to get the team to see your issue.
Plunker template: https://goo.gl/DlHd6U

See this.
http://plnkr.co/edit/0Dh65stBoG1v2VEAjvE5?p=preview

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

For me: showing user panels on hover without special overrides to attatch event listeners to a parent if the ripple is a sibling.

For everyone else: in general I think you'd run into this pretty easily. I also don't believe this bug is in Material for AngularJS, so anyone upgrading(like me) would be in trouble.

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

Angular: 4.1.1
Material: Beta 3
Browser: Chrome 58
OS: macOS 10.12.4

Is there anything else we should know?

@epelc
Copy link
Contributor Author

epelc commented May 11, 2017

image

@jelbourn jelbourn added the P3 An issue that is relevant to core functions, but does not impede progress. Important, but not urgent label May 11, 2017
devversion added a commit to devversion/material2 that referenced this issue May 12, 2017
Currently when a user places an element, that changes its color on hover, inside of a `md-option` or `md-list-item` the hover effect will never occur.

This is because the ripples are overlying the user content and all pointer events are blocked accidentally.

Fixes angular#4480
jelbourn pushed a commit that referenced this issue May 12, 2017
Currently when a user places an element, that changes its color on hover, inside of a `md-option` or `md-list-item` the hover effect will never occur.

This is because the ripples are overlying the user content and all pointer events are blocked accidentally.

Fixes #4480
@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
P3 An issue that is relevant to core functions, but does not impede progress. Important, but not urgent
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants