Search code examples
ionic-frameworkbackground-colorrubber-band

Ionic - black background on rubber band effect on iOS


I have disabled rubber band effect on the body, but it is still active on inner divs, and that is fine.

However, when the portion above the scrolled element is shown, the background is black, like in the image:

Black portion is the one displayed during the rubber band effect

I have tried to assign explicit colors to all parent containers, but nothing seems to work. Do you know how to set that color?


Solution

  • I had the same issue, but with background img. On android/windows background image looked fine, but on ios the screen was somehow filled with the black. After looking through the DOM tree, I finally found this:

    .ios .ion-page.show-page ~ .nav-decor {
    top: 0;
    position: absolute;
    z-index: 0;
    display: block;
    width: 100%;
    height: 100%;
    background: #000;
    pointer-events: none;}
    

    So in app.scss I put (dirty solution):

    .ios .nav-decor{background:transparent !important;}