title: Ionic 3 / Angular 5 / Chrome Absolute position + z-index problem on mobile device
body: <p>I'm working on an Ionic project where I have a page that displays, for each day of the week, items in horizontal scrolls (ion-slides).
  It also contains an ion-refresh.</p>
  
  <p>I want to display a label with the name of the day on top of each list so that it overlaps it (in my css; position: absolute + top:... + left: ... + z-index).</p>
  
  <p>When I serve my project and view it in my computer's browser, no problem, it's working fine.
  But on my Android device (accessing my development server via browser or in compiled app), the following happens :
  The labels that are visible without scrolling down are OK
  When I scroll down to see the other days, the labels are displayed behind the items.
  When I tap a label, it's "refreshed" and displayed correctly until I scroll again.
  When I pull the ion-refresh, even without getting at the point where the refresh function is triggered, all the labels are and stay displayed correctly.</p>
  
  <p><img src="https://i.stack.imgur.com/qfglw.gif" alt="screen capture of the problem"></p>
  
  <p>I guess it's a problem with Angular rendering but I was not able to find out which...</p>
  
  <p>Here is my code:</p>
  
  <p>pages/home/home.html
      </p>
  
  <pre><code>  &lt;ion-navbar&gt;
      &lt;ion-title&gt;Items&lt;/ion-title&gt;
    &lt;/ion-navbar&gt;
  
  &lt;/ion-header&gt;
  
  
  &lt;ion-content&gt;
  
    &lt;ion-refresher (ionRefresh)="doRefresh($event)"&gt;
      &lt;ion-refresher-content&gt;&lt;/ion-refresher-content&gt;
    &lt;/ion-refresher&gt;
  
  
    &lt;div *ngIf="productStatus == 'loaded'" class="productsContainer"&gt;
      &lt;day-products *ngFor="let day of weekdays" [products]="products[day.index]" [day]="day.longName"&gt;&lt;/day-products&gt;
    &lt;/div&gt;
  &lt;/ion-content&gt;
  </code></pre>
  
  <p>pages/home/home.ts</p>
  
  <pre><code>import { Component } from '@angular/core';
  import { NavController, Refresher } from 'ionic-angular';
  
  @Component({
    selector: 'page-home',
    templateUrl: 'home.html'
  })
  export class HomePage {
  
    public weekdays = [
      { longName: "Monday", index: 0 },
      { longName: "Tuesday", index: 1 },
      { longName: "Wednesday", index: 2 },
      { longName: "Thursday", index: 3 },
      { longName: "Friday", index: 4 },
      { longName: "Saturday", index: 5 },
      { longName: "Sunday", index: 6 }
    ];
  
    products: Array&lt;any&gt;
    productStatus: string;
  
    constructor(public navCtrl: NavController) {
      this.products = new Array&lt;any&gt;();
      this.productStatus = 'loading';
    }
  
    ionViewDidLoad() {
      this.fillProductArray();
    }
  
    fillProductArray() {
      this.productStatus = 'loading';
      this.products = new Array&lt;any&gt;();
      for (let dayIndex = 0; dayIndex &lt; 7; dayIndex++) {
        let day = new Array&lt;any&gt;();
        for (let productIndex = 0; productIndex &lt; 5; productIndex++) {
          day.push({
            name: 'Item ' + productIndex,
            description: 'Description for item ' + productIndex + ' of day number ' + dayIndex
          });
        }
        this.products.push(day);
      }
      this.productStatus = 'loaded';
    }
  
  
    doRefresh(refresher: Refresher) {
      this.fillProductArray();
      refresher.complete();
    }
  
  }
  </code></pre>
  
  <p>pages/home/home.module.ts</p>
  
  <pre><code>import { HomePage } from "./home";
  import { NgModule } from "@angular/core";
  import { IonicPageModule } from "ionic-angular";
  import { DayProductsComponentModule } from "../../components/day-products/day-products.module";
  
  
  @NgModule({
    declarations: [HomePage],
    imports: [
      IonicPageModule.forChild(HomePage),
      DayProductsComponentModule
    ]
  })
  export class HomePageModule {}
  </code></pre>
  
  <p>components/day-products/day-products.html</p>
  
  <pre><code>&lt;div class="wrapper"&gt;
    &lt;div class="day-name" ion-button #dayName&gt;{{day}}&lt;/div&gt;
    &lt;ion-slides centeredSlides="false" #slider&gt;
      &lt;ion-slide *ngFor="let product of products"&gt;
        &lt;div class="card-container"&gt;
          &lt;ion-card class="scroll-item" #productCard&gt;
            &lt;div class="image_wrapper"&gt;
              &lt;div class="image" [style.backgroundImage]="'url(http://placehold.it/500x500)'"&gt;
              &lt;/div&gt;
            &lt;/div&gt;
            &lt;ion-item class="product" text-wrap&gt;
              &lt;h2&gt;{{product.name}}&lt;/h2&gt;
              &lt;p&gt;{{product.description}}&lt;/p&gt;
            &lt;/ion-item&gt;
          &lt;/ion-card&gt;
        &lt;/div&gt;
      &lt;/ion-slide&gt;
    &lt;/ion-slides&gt;
  &lt;/div&gt;
  </code></pre>
  
  <p>components/day-products/day-products.scss</p>
  
  <pre><code>day-products {
      .wrapper {
          position: relative;
          .day-name {
              top: -16px;
              left: 24px;
              position: absolute;
              width: 120px;
              padding-top: 0;
              z-index: 100;
          }
          ion-slides {
              margin-top: 10px;
              margin-bottom: 10px;
              padding-top: 8px;
              .swiper-slide {
                  height: auto;
                  width: 90%;
                  .slide-zoom {
                      height: 100%;
                      .card-container {
                          height: calc(100% - 10px);
                          ion-card {
                              margin-top: 0;
                              height: 100%;
                              display: inline-block;
                              .image_wrapper {
                                  height: 150px;
                                  width: 100%;
                                  position: relative;
                                  .image {
                                      position: absolute;
                                      width: 100%;
                                      height: 100%;
                                      background-position: center;
                                      background-size: cover;
                                      background-repeat: none;
                                  }
                              }
                          }
                      }
                  }
              }
              .swiper-slide:only-child {
              width: 100%;
              }
          }
      }
  }
  </code></pre>
  
  <p>components/day-products/day-products.ts</p>
  
  <pre><code>import { Component, ViewChild, Input } from '@angular/core';
  import { Slides } from "ionic-angular";
  
  @Component({
    selector: 'day-products',
    templateUrl: 'day-products.html'
  })
  export class DayProductsComponent {
  
    @Input()
    day: string;
  
    @Input()
    products: Array&lt;any&gt;;
    @ViewChild('slider') slider: Slides;
  
    constructor() {
    }
  
    ngAfterViewInit() {
      this.slider.freeMode = true;
      this.slider.slidesPerView = 'auto';
    }
  
  }
  </code></pre>
  
  <p>components/day-products/day-products.module.ts</p>
  
  <pre><code>import { NgModule } from "@angular/core";
  import { DayProductsComponent } from "./day-products";
  import { IonicModule, } from "ionic-angular";
  
  @NgModule({
      declarations: [DayProductsComponent],
      imports: [
          IonicModule
      ],
      exports: [DayProductsComponent]
  })
  export class DayProductsComponentModule { }
  </code></pre>
  
  <p>package.json</p>
  
  <pre><code>{
    "name": "horizontalScrollDemo",
    "version": "0.0.1",
    "author": "Ionic Framework",
    "homepage": "http://ionicframework.com/",
    "private": true,
    "scripts": {
      "start": "ionic-app-scripts serve",
      "clean": "ionic-app-scripts clean",
      "build": "ionic-app-scripts build",
      "lint": "ionic-app-scripts lint"
    },
    "dependencies": {
      "@angular/common": "5.0.3",
      "@angular/compiler": "5.0.3",
      "@angular/compiler-cli": "5.0.3",
      "@angular/core": "5.0.3",
      "@angular/forms": "5.0.3",
      "@angular/http": "5.0.3",
      "@angular/platform-browser": "5.0.3",
      "@angular/platform-browser-dynamic": "5.0.3",
      "@ionic-native/core": "4.4.0",
      "@ionic-native/splash-screen": "4.4.0",
      "@ionic-native/status-bar": "4.4.0",
      "@ionic/storage": "2.1.3",
      "cordova-android": "7.0.0",
      "cordova-plugin-device": "^2.0.2",
      "cordova-plugin-ionic-keyboard": "^2.1.2",
      "cordova-plugin-ionic-webview": "^2.1.4",
      "cordova-plugin-splashscreen": "^5.0.2",
      "cordova-plugin-statusbar": "^2.4.2",
      "cordova-plugin-whitelist": "^1.3.3",
      "ionic-angular": "3.9.2",
      "ionicons": "3.0.0",
      "rxjs": "^5.5.7",
      "sw-toolbox": "3.6.0",
      "zone.js": "0.8.18"
    },
    "devDependencies": {
      "@ionic/app-scripts": "3.1.8",
      "typescript": "2.4.2"
    },
    "description": "An Ionic project",
    "cordova": {
      "plugins": {
        "cordova-plugin-whitelist": {},
        "cordova-plugin-statusbar": {},
        "cordova-plugin-device": {},
        "cordova-plugin-splashscreen": {},
        "cordova-plugin-ionic-webview": {
          "ANDROID_SUPPORT_ANNOTATIONS_VERSION": "27.+"
        },
        "cordova-plugin-ionic-keyboard": {}
      },
      "platforms": [
        "android"
      ]
    }
  }
  </code></pre>
  
  <p>I really would appreciate some help!!</p>
  
  <p><strong>EDIT:</strong></p>
  
  <p>On my device, in Firefox and native browser (Samsung), labels are displayed as they should be. The problem seems to occurs only in Chrome (v. 69.0.3497.100). On my computer, in Chrome and Firefox, display is fine.</p>