question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

ion-ripple-effect is not working

See original GitHub issue

Bug 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

image

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:closed
  • Created 5 years ago
  • Comments:8 (5 by maintainers)

github_iconTop GitHub Comments

3reactions
brandyscarneycommented, Sep 11, 2019

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.

3reactions
brandyscarneycommented, Sep 9, 2019

There are two reasons this doesn’t work:

  1. The ion-ripple-effect needs the parent element to have position: relative because it is absolutely positioned, otherwise it will just go over everything on the page.
  2. It looks for the 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 click

I believe this could just be a documentation issue.

Read more comments on GitHub >

github_iconTop 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 >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found