-
Notifications
You must be signed in to change notification settings - Fork 2.1k
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(select): Only add line ripple listeners when line ripple is present #3470
Conversation
packages/mdc-select/index.js
Outdated
@@ -287,7 +290,9 @@ class MDCSelect extends MDCComponent { | |||
const targetClientRect = evt.target.getBoundingClientRect(); | |||
const xCoordinate = evt.clientX; | |||
const normalizedX = xCoordinate - targetClientRect.left; | |||
this.lineRipple_.setRippleCenter(normalizedX); | |||
if (this.lineRipple_) { |
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.
This would never not be true since we're not hooking up the listener to this method if line ripple doesn't exist, right?
All 349 screenshot tests passed for commit 0028c22 vs. |
All 349 screenshot tests passed for commit e0f75f3 vs. |
Codecov Report
@@ Coverage Diff @@
## master #3470 +/- ##
=========================================
Coverage ? 98.42%
=========================================
Files ? 119
Lines ? 5021
Branches ? 614
=========================================
Hits ? 4942
Misses ? 79
Partials ? 0
Continue to review full report at Codecov.
|
…nt (material-components#3470) (cherry picked from commit 453b5c5)
Modifies the line ripple logic in the
select
to only add the event listeners or updates if the line ripple element exists.