When navigating to a page from a popover in Ionic2, scrolling is disabled. Here are the details of the issue:
I have 3 pages, with one being the timeline containing the following code:
let popover = Popover.create(ItemListPage, {items: data.data});
this.nav.present(popover);
In the above code, the timeline calls a popover called ItemList, which has the following code:
close() {
this.viewCtrl.dismiss();
}
showUserProfile(user){
this.close(); //I added this line to check if the popover is causing the issue
this.nav.push(UserProfilePage, { userToShow: user});
}
As seen in the code, when an item in the popover is clicked, the showUserProfile function is triggered. It closes the popover (added for debugging purposes) and then navigates to another page: UserProfilePage.
In the UserProfilePage, there is a scroller that works fine in all cases except when navigating from the ItemListPage popover. In this scenario, the scroller only works if I replace
this.nav.push(UserProfilePage, { userToShow: user});
with
this.nav.setRoot(UserProfilePage, { userToShow: user});
I'm unsure why this issue occurs and how to rectify it. PS: I intend to keep the popover open, but I included the closure for troubleshooting purposes.