-
Notifications
You must be signed in to change notification settings - Fork 6.7k
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
fix(button): ripples blocking mouse events on user content #4526
Conversation
* The ripple overlay intercepts all mouse events on the user content and therefore users are not able to have interactive elements in their buttons. Normally buttons should not contain interactive elements inside, but since the fix is very easy it wouldn't hurt fixing it. * Removing the `(touchstart)` event that should prevent initial clicks because it didn't do anything (because of pointer-events: none) and the initial click doesn't seem to happen anymore. Related to angular#4503
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM, one minor note.
src/lib/button/button.scss
Outdated
// Disable pointer events for the ripple container and focus overlay because the container | ||
// will overlay the user content and we don't want to disable mouse events on the user content. | ||
// Pointer events can be safely disabled because the ripple trigger element is the host element. | ||
pointer-events: none; | ||
} | ||
|
||
// Overlay to be used as a tint. Note that the same effect can be achieved by using a pseudo |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The comment here needs to be updated as well.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Done.
LGTM |
This issue has been automatically locked due to inactivity. Read more about our automatic conversation locking policy. This action has been performed automatically by a bot. |
The ripple overlay intercepts all mouse events on the user content and therefore users are not able to have interactive elements in their buttons.
Normally buttons should not contain interactive elements inside, but since the fix is very easy it wouldn't hurt fixing it.
Removing the
(touchstart)
event that should prevent initial clicks because it didn't do anything (because of pointer-events: none) and the initial click doesn'tseem to happen anymore.
Related to #4503