0

I have a page that can be displayed properly as a single page. However, when I show it using Popover controller, its content cannot be scrolled on iOS 11.2. On Android, the popover works fine.

Here is my ionic info (by running ionic info)

cli packages: (/usr/local/lib/node_modules)

@ionic/cli-utils  : 1.19.2
ionic (Ionic CLI) : 3.20.0
global packages:

cordova (Cordova CLI) : 8.0.0 
local packages:

@ionic/app-scripts : 3.1.8
Cordova Platforms  : android 7.0.0 ios 4.5.4
Ionic Framework    : ionic-angular 3.9.2
System:

Android SDK Tools : 25.2.5
Node              : v8.10.0
npm               : 5.6.0 
OS                : macOS Sierra

Here is my code:

showRoutes(event) {
    let popover = this.popoverCtrl.create(MyPage, {});
    popover.present({
      ev: event
    });
  }

This is MyPage html:

<ion-header>
  <ion-navbar>
    <ion-title>Routes</ion-title>
  </ion-navbar>
</ion-header>

<ion-content>
  <ion-list>
    <div ion-item class="list-header">
      <div>Location</div>
      <div class="item-note" item-right>Distance (miles)</div>
    </div>
    <button ion-item *ngFor="let item of evacuationPoints">
      <div>{{item.title}}</div>
      <div class="item-note" item-right>{{item.distance}}</div>
    </button>
  </ion-list>
</ion-content>

Does any one have the same problem and know how to fix? if this cannot be fixed, then Popover is useless. In the screenshot below, the list is hidden and unable to scroll up on iOS only.

enter image description here

2
  • I am facing the same issue. Did you find a solution? Commented May 21, 2018 at 7:48
  • @pooja-shah: See my finding below. Commented May 21, 2018 at 11:52

2 Answers 2

2

Using <ion-scroll scrollY="true"> this instead of <ion-content> solves this issue.

MyPage html becomes:

<ion-header>
  <ion-navbar>
    <ion-title>Routes</ion-title>
  </ion-navbar>
</ion-header>

<ion-scroll scrollY="true">
  <ion-list>
    <div ion-item class="list-header">
      <div>Location</div>
      <div class="item-note" item-right>Distance (miles)</div>
    </div>
    <button ion-item *ngFor="let item of evacuationPoints">
      <div>{{item.title}}</div>
      <div class="item-note" item-right>{{item.distance}}</div>
    </button>
  </ion-list>
</ion-scroll>
Sign up to request clarification or add additional context in comments.

Comments

0

try adding scrollY="false" in the popOver component

<ion-content scrollY="false">
  <ion-list>
    <ion-item>Some item</ion-item>
    <ion-item>Some item2</ion-item>
  </ion-list>
</ion-content>

This helped in my project, as it seemed that the inner scroll on iOS was blocking the natural popOver scroll

1 Comment

Issue still present on Ionic 6. Seems counterintuitive but that fixed the issue for me on iOS and kept working just fine on Android. Dunno why it had a -1 vote.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.