This repository was archived by the owner on Sep 5, 2024. It is now read-only.
File tree Expand file tree Collapse file tree 2 files changed +11
-1
lines changed Expand file tree Collapse file tree 2 files changed +11
-1
lines changed Original file line number Diff line number Diff line change @@ -432,6 +432,7 @@ InkRippleCtrl.prototype.removeRipple = function (ripple) {
432
432
if ( index < 0 ) return ;
433
433
this . ripples . splice ( this . ripples . indexOf ( ripple ) , 1 ) ;
434
434
ripple . removeClass ( 'md-ripple-active' ) ;
435
+ ripple . addClass ( 'md-ripple-remove' ) ;
435
436
if ( this . ripples . length === 0 ) this . container . css ( { backgroundColor : '' } ) ;
436
437
// use a 2-second timeout in order to allow for the animation to finish
437
438
// we don't actually care how long the animation takes
Original file line number Diff line number Diff line change @@ -115,13 +115,13 @@ input {
115
115
}
116
116
117
117
.md-ripple {
118
+ $sizeDuration : 0.45s * 2 ;
118
119
position : absolute ;
119
120
transform : translate (-50% , -50% ) scale (0 );
120
121
transform-origin : 50% 50% ;
121
122
opacity : 0 ;
122
123
border-radius : 50% ;
123
124
& .md-ripple-placed {
124
- $sizeDuration : 0.45s * 2 ;
125
125
transition : margin $sizeDuration $swift-ease-out-timing-function ,
126
126
border $sizeDuration $swift-ease-out-timing-function ,
127
127
width $sizeDuration $swift-ease-out-timing-function ,
@@ -135,6 +135,15 @@ input {
135
135
& .md-ripple-active , & .md-ripple-full , & .md-ripple-visible {
136
136
opacity : 0.20 ;
137
137
}
138
+ & .md-ripple-remove {
139
+ animation : md- remove- ripple $sizeDuration $swift-ease-out-timing-function ;
140
+ }
141
+ }
142
+
143
+ // Fix issue causing ripple disappear suddenly in Chrome version 51, opacity .15 is close to the opacity when a normal click mouseup
144
+ @keyframes md-remove-ripple {
145
+ 0% { opacity : .15 ; }
146
+ 100% { opacity : 0 ; }
138
147
}
139
148
140
149
.md-padding {
You can’t perform that action at this time.
0 commit comments