ion-ripple-effect is not working
See original GitHub issueBug Report
Ionic version:
[x] 4.x
Describe the Feature Request ion-ripple-effect not working with ion-col, its just getting omitted from the html and hides the ion-col element
Describe Preferred Solution ion-ripple-effect should add ripple effect to ion-col element as referred in the docs https://ionicframework.com/docs/api/ripple-effect
Describe Alternatives
Related Code
<ion-grid>
<ion-row>
<ion-ripple-effect>
<ion-col
size-md="4"
size-xs="12"
size-sm="6"
size-lg="4"
*ngFor="let item of pendingitems"
>
<ion-card text-left>
</ion-card>
</ion-col>
</ion-ripple-effect>
</ion-row>
</ion-grid>
Additional Context
Issue Analytics
- State:
- Created 5 years ago
- Comments:8 (5 by maintainers)
Top Results From Across the Web
ion-ripple-effect is not working · Issue #17477 - GitHub
Trying to update to Ionic 4.0.2 doesn't fix the problem. Reviewing the RippleEffect component in source, i cannot found any procedure to capture ......
Read more >Ion ripple effect not working inside a plain html button
I had to add the ion-activatable class to the button to make it work: <button class="ion-activatable" type="submit" form="myForm"> ...
Read more >How to use ion-ripple-effect? - Ionic Framework
Hello, I'm trying to use ionic-ripple-effect in ionic 4 according to the documentation with a div element: <div style="height: 100px; ...
Read more >Ionic V4 Issue Ripple Item - StackBlitz
<ion-icon slot="start" color="medium". name="bug"></ion-icon> ... <ion-label>I'm a click item with ripple. element. ... ion-ripple-effect>. </ion-item>.
Read more >ion-ripple-effect on div - CodePen
Insecure Resource. The resource you are linking to is using the 'http' protocol, which may not work when the browser is using https....
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
I updated the documentation for ripple effect to include steps on adding the CSS and class: https://github.com/ionic-team/ionic/blob/master/core/src/components/ripple-effect/readme.md
I think the extra CSS is something we could add to
.ion-activatable
in the ionic CSS. We could possibly add the class by default to the ripple parent, but I think being able to toggle this class with a disabled element gives the user more control.There are two reasons this doesn’t work:
ion-ripple-effect
needs the parent element to haveposition: relative
because it is absolutely positioned, otherwise it will just go over everything on the page.ion-activatable
class on the parent element because we use this to determine whether or not an element is clickable.I’ve updated the Codepen from @robingenz to show it working with the div: https://codepen.io/ionic/pen/PoYQMzO
Note: I also added
user-select: none
to avoid selecting the text in the div on clickI believe this could just be a documentation issue.